|
From: | Kim F. Storm |
Subject: | Re: Can't stop find-grep-dired when using Cygwin for the inferior process - bug in shell-quote-argument? |
Date: | Mon, 28 Aug 2006 10:02:59 +0200 |
User-agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Lennart Borgman <address@hidden> writes: >> find . ( -type f -exec grep -q -e "message" {} ; ) -exec ls -ld {} ; > > Thanks, that expression works with the GnuWin32 port of GNU find and > CMD.exe. > > To remove the bugs I suggest the following approach: > > 1) A new function quote-special-characters that will quote characters > like (); if it is a unix style shell. > > 2) A new function w32-shell-is-unix-style that looks at shell-file-name. > > 3) A new variable w32-unix-style-shells that have a list of regexps > for the function in 2 to use for matching shell-file-name > > 4) Use 2 in 1 and in shell-quote-argument > > How about this approach? Those are details ... the problem is shell-quote-argument which obviously has bugs on w32 for some types of shell. Someone who understands the issue should fix this. I have fixed find-dired and find-grep-dired to properly use shell-quote-argument on all special arguments, i.e. ( ) {} and ;. So once shell-quote-argument is fixed, find-dired commands should be fixed too. > BTW the doc string for find-grep-dired is incorrect in several ways. Can you propose a better doc string. -- Kim F. Storm <address@hidden> http://www.cua.dk
[Prev in Thread] | Current Thread | [Next in Thread] |