Hi, I've included a patch to fix three grep.el bugs. I'm using patched EmacsW32-1.06 (Emacs-22-CvsP060818-EmacsW32-1.06.exe) but grep.el looks to be the same as the latest one in CVS. OS is Windows XP, default shell is 4NT, and I'm using the GnuWin32 versions of find, grep and xargs. Firstly, grep-find-use-xargs handling is slightly wrong. The docs state that if grep-find-use-xargs is nil, xargs won't be used. But that isn't quite true -- if grep-find-use-xargs is nil, grep-compute-defaults tries to work out whether grep-find-use-xargs should actually be 'gnu. On my PC at least, 'gnu doesn't work (xargs gives the error "grep: Invalid argument"). I didn't look into this bit, because it seemed like you could make grep.el use find -exec instead. But that wasn't the case -- since I actually have a GNU xargs.exe available in the PATH it was impossible to make grep-compute-defaults set things up to use find -exec rather than xargs. Judging by the docstring for grep-find-use-xargs, this was wrong. The new behaviour is described in the new docstring. It should be backwards-compatible for all sensible uses. In particular, if grep-find-use-xargs is nil, the existing autodetection is still performed. (Perhaps I should just have figured out why xargs doesn't work...) The second bug is that grep.el doesn't use shell-quote-argument when constructing the args for find. It just use "\\(", "\\)" and "\\;" literally. This was causing errors on my PC: unixfind: paths must precede expression Usage: unixfind [-H] [-L] [-P] [path...] [expression] Changing grep.el to use shell-quote-argument where appropriate fixed this. Finally, grep.el mishandles the case where find-program is something other than "find". (Since Windows XP includes a "find.exe", I suppose others might be changing find-program to point at an alternatively-named version of GNU find.) See also: http://lists.gnu.org/archive/html/bug-gnu-emacs/2003-11/msg00029.html I've changed grep-compute-defaults accordingly, so that M-x find-grep puts the cursor at the right point. If Thunderbird has done the right thing, you should see the patch as text below. It is also available from my web page: http://www.tomseddon.plus.com/emacs/grep/grep.el.patch A pre-patched grep.el is also available there: http://www.tomseddon.plus.com/emacs/grep/grep.el --Tom