unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Donald H Locker <dhlocker@comcast.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 29680@debbugs.gnu.org
Subject: bug#29680: another grep-find anomalous behaviour
Date: Mon, 18 Dec 2017 07:35:22 -0500	[thread overview]
Message-ID: <8b7fa7fd-9693-e2de-4eb8-84bcbbe4f427@comcast.net> (raw)
In-Reply-To: <83vah7soy3.fsf@gnu.org>

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.

To answer the other comments, televant customisations (all in 
(custom-set-variables ...)) are:

;; ignore line-wraps, please, in the following. in my .emacs, each is
;; really all on one line and I haven't figured out all of Thunderbird's
;; options yet

'(explicit-shell-file-name "c:/cygwin64/bin/bash")

'(exec-path
    (quote
     ("C:/cygwin64/bin" "C:/Program Files/Common Files/Microsoft 
Shared/Microsoft Online Services" "C:/Program Files (x86)/Common 
Files/Microsoft Shared/Microsoft Online Services" "C:/Windows/system32" 
"C:/Windows" "C:/Windows/System32/Wbem" 
"C:/Windows/System32/WindowsPowerShell/v1.0/" "C:/Program 
Files/Intel/WiFi/bin/" "C:/Program Files/Common 
Files/Intel/WirelessCommon/" "C:/Program Files/TortoiseSVN/bin" 
"c:/Users/dlocker/AppData/Roaming/local/bin/emacs-24.5-bin-i686-mingw32/libexec/emacs/24.5/i686-pc-mingw32" 
"c:/ProgramData/Oracle/Java/javapath")))

'(grep-command "grep -nHE ")

'(grep-find-command (quote ("find . -type f -exec grep -nHE  {} \\;" . 32)))

-- 
*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 15-Dec-2017 15:42, Eli Zaretskii wrote:
>> Cc: 29680@debbugs.gnu.org
>> From: Donald H Locker <dhlocker@comcast.net>
>> Date: Fri, 15 Dec 2017 13:46:32 -0500
>>
>> The underlying "unixy" environment is cygwin; updated a few weeks ago.
> 
> What customizations do you have to go with that setup?  Any
> customizations of shell-file-name or similar variables?
> 
>> The behaviour is very repeatable, though - at one level in the directory
>> hierarchy, the command fails to even execute find; at one higher level
>> in the directory hierarchy, the command succeeds and finds the sought
>> strings in the file.
> 
> It's hard to reason about your case without knowing which files are
> present in each directory.  Would you mind to concoct a small test
> case, where all directories and files in the tree to be searched by
> 'find' are explicitly spelled out?
> 
>> Note that in the Model_withEVSE directory, "find ."  doesn't seem to
>> think that '.' is a directory
> 
> I think your interpretation of the error message is mistaken.  It says
> "paths must precede expression", but that's because somehow '*.log' is
> expanded into more than a single argument.  I suspect that the command
> works in a directory with no files whose names match *.log, and
> doesn't work where there are such files.  So I'd suggest to continue
> looking into the quoting issue.  One possibility is to replace 'find'
> with a program or a batch file which will just echo its command-line
> arguments, and then see how Emacs invokes it.
> 





  reply	other threads:[~2017-12-18 12:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 20:36 bug#29680: 24.5; find-grep not finding a file or missing the grep Donald H Locker
2017-12-15 12:25 ` bug#29680: another grep-find anomalous behaviour Donald H Locker
2017-12-15 16:49   ` Eli Zaretskii
2017-12-15 16:52     ` Eli Zaretskii
2017-12-15 18:46     ` Donald H Locker
2017-12-15 20:42       ` Eli Zaretskii
2017-12-18 12:35         ` Donald H Locker [this message]
2017-12-18 16:21           ` Eli Zaretskii
2017-12-18 17:18             ` Donald H Locker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b7fa7fd-9693-e2de-4eb8-84bcbbe4f427@comcast.net \
    --to=dhlocker@comcast.net \
    --cc=29680@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).