Grep failing with Emacs (windows), and GnuWin32 Grep
- by Andy
Hi,
I've downloaded and installed the GnuWin32 tools, and added the grep executables to the Emacs bin. I've also, for what its worth, added the GnuWin32 bin folder to my Path variable.
Problem is though, when I try and run with suggested grep commands, I always get:
Grep exited abnormally with code 53 at Wed Feb 24 17:16:12
For the life of me, I can't find any reference to error code 53 anywhere! :(
I've tried the exact examples on a number of websites for example, when I enter:
M-x grep <ret>
It comes up with
Run grep (like this): grep -n
Which is fine, but I have no idea of what parameters it expects. I've tried some in some tuorials, but I get error code 53 again!
One of the things I've tried is straight from the emacs wiki (http://www.emacswiki.org/emacs/GrepMode#toc2) (maybe not for the windows version though?) and it says to try this command:
M-x grep -n -e setq ~/.emacs
Which I've tried and I get:
-*- mode: grep; default-directory: "c:/[My Directory]/" -*-
Grep started at Wed Feb 24 17:30:47
grep -n -e setq ~/.emacs NUL
Grep exited abnormally with code 53 at Wed Feb 24 17:30:47
So frustrating as this is meant to be a powerful feature of Emacs and I'm really trying to learn it as I've heard good things about it!
Any help would be appreciated! :)
Andy
UPDATE
From the suggestion below, I've tried it via command line and it seems to work fine, perhaps there some config I'm
UPDATE
I've found the command M-x Occur which seems to do much the same as I would image grep does. Are there many extra benefits to using grep over occur if I can't get this working?