Subject: bug#29680: another grep-find anomalous behaviour

From: Donald H Locker <[email-masked]>
Date: Mon, 18 Dec 2017 12:18:41 -0500

I'm going to suggest this bug be held in abeyance until I test a few 
other issues; this may well be a cygwin behaviour, in retrospect.

I recently had to change all of my "egrep" to "grep -E" to address other 
issues, likely related to cygwin updates. My system log indicates 
updates of cygwin on 03Nov2017, 27Nov2017, 05Dec2017, and 15Dec2017. 
(This is the largest cluster of updates I have done within the last 
year.) Curiously, the 27Nov update included a w32api-runtime update, and 
this approximately coincides with the beginning of some of the troubles 
I am having. (I use find-grep _a_lot_ and don't remember ever having any 
problems until recently. I probably should have looked at my system log 
before raising a bug about emacs.)

To answer the question:

My typing was the source of the 'quotes' and the \\quoted-* (the default 
command presented in the minibuffer was

    find . -type f -exec grep -nHE  {} \;

I supply the "-name 'blahblah'" and the "regexp".)

Donald.
-- 
*Plain Text* email -- it's an accessibility issue
() no proprietary attachments; no html mail
/\ <http://www.georgedillon.com/web/html_email_is_evil.shtml>

On 18-Dec-2017 11:21, Eli Zaretskii wrote:
>> Cc: [email-masked]
>> From: Donald H Locker <[email-masked]>
>> Date: Mon, 18 Dec 2017 07:35:22 -0500
>>
>> It would appear that quoting of the '*.log' part of the command is at
>> fault.  Changing the line from
>>
>>     -name '*.log'
>> to
>>
>>     -name \\*.log
>>
>> allows the find to proceed normally. There are several files with .log
>> extensions in the directory from which the find-grep fails.
> 
> Makes sense.
> 
> It's probably some subtle snafu with command-line quoting.  Were the
> 'qoutes' typed by you, or did Emacs produce them?
> 
> In any case, if you can spot where this quoting goes wrong, please
> tell the details.  The combination of a native Windows Emacs and
> Cygwin shell/utilities is relatively less well tested and has
> subtleties, so I'm not surprised to hear about such problems.
>