emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't stop find-grep-dired when using Cygwin for the inferior proces


From: Jason Rumney
Subject: Re: Can't stop find-grep-dired when using Cygwin for the inferior process - bug in shell-quote-argument?
Date: Sun, 27 Aug 2006 21:08:43 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.4) Gecko/20060516 Thunderbird/1.5.0.4 Mnenhy/0.7.4.666

Lennart Borgman wrote:
In any case the command string that is built and send to CMD does not work. Here I am using the GnuWin32 port of find, version 4.2.20. Find complains about the first -exec:

find . \( -type f -exec grep -q -e "message" {} \; \) -exec ls -ld {} \;
   find: missing argument to `-exec'

Stepping through shell-quote-argument it I can see that it tales the 'windows-nt path so that should be ok. There is only one call to shell-quote-argument involved and that is from find-grep-dired. How should the above command look in this case? I am not very familiar with find. Perhaps is it not possible to give this command with CMD.EXE?

I haven't tried it myself, but I think the following will work with cmd.exe and a native port of GNU find:

find . ( -type f -exec grep -q -e "message" {} ; ) -exec ls -ld {} ;

The problem appears to be that although the string to pass to grep is passed to shell-quote-argument, other parts of the expression have hard-coded backslashes. However, passing them to shell-quote-argument will introduce extra double-quotes on Windows, and I am not sure whether that will work or not.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]