Error “grep exited abnormally with code 2” on Xemacs 21.4.22 on Windows 7

Posted on

QUESTION :

I am trying to run grep (cygwin) within Xemacs 21.4.22 on windows 7 enterprise laptop.

cd c:
grep -n -r --include=*.java "foo" NUL:
grep: NUL:: No such file or directory

grep exited abnormally with code 2 at Tue Oct 04 12:53:15
cd c:
grep -n -r --include=*.java "foo" * NUL:
grep: NUL:: No such file or directory

grep exited abnormally with code 2 at Tue Oct 04 12:56:55
c:>grep --version
GNU grep 2.6.3

Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

What am I doing wrong? How can I fix this?

Assuming that Xemacs was wrong, I tried it on emacs 23.2.1 (mingw) on the same laptop and it is getting the same error response.

ANSWER :

This problem is discussed, with several possible solutions, at EmacsWiki http://www.emacswiki.org/emacs/NTEmacsWithCygwin. I don’t have your exact setup here – so you would have to try the options there to see what works.

Leave a Reply

Your email address will not be published.