M-x grep, M-x lgrep, M-x rgrep don't work in EmacsW32 for me.
I do M-x lgrep and it says grep is not a command:
grep -i -n "hello" * NUL
'grep' is not recognized as an internal or external command,
operable program or batch file.
Grep finished with no matches found at Sun Jan 31 05:59:06
Also what is that NUL thing? EmacsW32 homepage says it ships with Gnuwin32 utilities but it seems the work to configuring to actually use the Gnuwin32 grep is left to users.
How can I configure it to use either the shipped Gnuwin32 grep or the cygwin grep? Are both fine?
NUL
is a fake file, the equivalent of/dev/null
in Unix, that behaves like an empty file. I think that the intention is that if you forget to put a list of files on the command line,grep
will not fail with an error message (since there is file NUL), but if you do think about providing files, NUL will be ignored (since it never matches). If that's the reason, it's a bit of hair-splitting on the part of Emacs creators. – Durancegrep
command? Ifgrep
is provided with EmacsW32, it should be in a prominent location. – Durancegit-bash
installed, you can include...\Git\usr\bin
in your Windows PATH variable where ... is the path to your git-bash installation. – Luau