* rgrep on Windows with ezwinports. Shell quoting problem.
@ 2013-12-24 15:17 Óscar Fuentes
2013-12-24 16:53 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Óscar Fuentes @ 2013-12-24 15:17 UTC (permalink / raw)
To: help-gnu-emacs
After trying with findutils/grep from GnuWin32 and MSYS without success,
using the binaries from
http://sourceforge.net/projects/ezwinports/files/ works with this config:
(setq find-program "d:/ez/bin/find")
(setq xargs-program "d:/ez/bin/xargs")
(setq grep-program "d:/ez/bin/grep")
but there are some issues. The lesser one is that the pattern "*" for
files does not cover those with extension (i.e. something like foo.cpp
is not matched) so one must use "*.*".
The most serious problem is that the rgrep output comes with lots of
warnings of this type:
d:/ez/bin/find: warning: Filenames usually don't contain slashes (though pathnames do). That means that '-name *.bin\
' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ *.bin\
'.
The above is a literal cut&paste from the output, which includes a
newline after ``*.bin\''. As shown on the *grep* buffer, the command
executed by rgrep is like this:
d:/ez/bin/find . [...] -o -name "*.bin" [...]
So at some point "*.bin" is translated to *.bin\[newline]
Directly pasting the command from the *grep* buffer into a Windows Shell
box works fine (after replacing d:/ez/bin/ with d:\ez\bin\). So the
problem is with Emacs modifying the command generated by rgrep before
passing it to the shell for execution.
How can I prevent that change?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rgrep on Windows with ezwinports. Shell quoting problem.
2013-12-24 15:17 rgrep on Windows with ezwinports. Shell quoting problem Óscar Fuentes
@ 2013-12-24 16:53 ` Eli Zaretskii
2013-12-24 17:25 ` Óscar Fuentes
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2013-12-24 16:53 UTC (permalink / raw)
To: help-gnu-emacs
> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Tue, 24 Dec 2013 16:17:26 +0100
>
> The most serious problem is that the rgrep output comes with lots of
> warnings of this type:
>
>
> d:/ez/bin/find: warning: Filenames usually don't contain slashes (though pathnames do). That means that '-name *.bin\
> ' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ *.bin\
> '.
This is bug #16045 which was fixed 3 weeks ago on the development
trunk. Are you using an old development trunk?
> How can I prevent that change?
Upgrade.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rgrep on Windows with ezwinports. Shell quoting problem.
2013-12-24 16:53 ` Eli Zaretskii
@ 2013-12-24 17:25 ` Óscar Fuentes
0 siblings, 0 replies; 3+ messages in thread
From: Óscar Fuentes @ 2013-12-24 17:25 UTC (permalink / raw)
To: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
> This is bug #16045 which was fixed 3 weeks ago on the development
> trunk. Are you using an old development trunk?
It's 2 months old.
>> How can I prevent that change?
>
> Upgrade.
Will do. Thanks Eli.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-24 17:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-24 15:17 rgrep on Windows with ezwinports. Shell quoting problem Óscar Fuentes
2013-12-24 16:53 ` Eli Zaretskii
2013-12-24 17:25 ` Óscar Fuentes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).