unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: John Mastro <john.b.mastro@gmail.com>
Cc: 23590@debbugs.gnu.org, agrambot@gmail.com
Subject: bug#23590: 25.0.94; Errors in default lgrep command
Date: Sat, 23 Jul 2016 10:45:10 +0300	[thread overview]
Message-ID: <83fur0x0ft.fsf@gnu.org> (raw)
In-Reply-To: <CAOj2CQR4WO6vsPu=GkydP7BpgjV9ppcbmjTjiHSyQ2TPHgDyag@mail.gmail.com> (message from John Mastro on Fri, 22 Jul 2016 19:16:27 -0700)

> From: John Mastro <john.b.mastro@gmail.com>
> Date: Fri, 22 Jul 2016 19:16:27 -0700
> Cc: Alex <agrambot@gmail.com>
> 
> Alex <agrambot@gmail.com> wrote:
> > The default lgrep command (`all' for the FILES argument) gives
> > off unexpected errors.
> >
> > * When there are no hidden (dot) files in the given directory, then I
> >   get the following error:
> >
> > zsh:1: no matches found: *.
> > Grep exited abnormally with code 1 at ...
> >
> > By default lgrep uses my default shell (zsh). Should this be the case?
> > Setting `shell-file-name' to "bash" fixes this error, but it still
> > produces the next error.
> 
> Thanks for reporting this. I've seen it too.
> 
> The problem seems to be caused by a difference in how zsh handles globs
> that don't match anything, compared to bash. I'm not sure what the right
> way would be to accommodate it in Emacs. Hopefully someone will be along
> shortly with ideas for that.

Shell commands that Emacs emits support /bin/sh and compatible
shells.  Zsh's default treatment of unmatched wildcards isn't.

I don't know how it happened that lgrep invokes zsh on OP's system,
but if that is due to user customizations, they should be corrected.
If that is Emacs's fault (i.e. Emacs invokes zsh without any
customizations), it should be fixed.

> > * When there are directories in the given directory (this includes . and
> >   ..) then lgrep produces an error for each directory. For example:
> >
> >
> > grep: .: Is a directory
> > grep: ..: Is a directory
> > grep: .emacs.d: Is a directory
> >
> > Grep exited abnormally with code 2 at ...
> 
> GNU Grep has an option (-d ACTION or --directories=ACTION) that can be
> used to skip over directories (with "skip" as the ACTION), but it's not
> in POSIX so I doubt we can use it in Emacs. If you know it will be
> available on your system(s), you could add it to your `grep-template'
> using the same technique as above.

Yes, but I don't understand why the OP says these are errors.  They
aren't; they are just informative messages from Grep.





  reply	other threads:[~2016-07-23  7:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-21  0:11 bug#23590: 25.0.94; Errors in default lgrep command Alex
2016-07-23  2:16 ` John Mastro
2016-07-23  7:45   ` Eli Zaretskii [this message]
2016-07-23 16:57     ` John Mastro
2016-07-23 17:15       ` Eli Zaretskii
2016-07-23 17:23         ` John Mastro
2016-07-23 17:58           ` Eli Zaretskii
2016-07-23 19:52             ` Glenn Morris
2016-07-23 17:28     ` Alex
2016-07-23 18:00       ` Eli Zaretskii
2016-07-23 18:18         ` Eli Zaretskii
2016-07-23 22:12           ` Alex
2020-09-04 14:09             ` Lars Ingebrigtsen
2020-10-07  3:41               ` Lars Ingebrigtsen
2020-10-07  8:17                 ` Eli Zaretskii
2020-10-09  4:15                   ` Lars Ingebrigtsen
2020-10-13 20:09                     ` Juri Linkov
2020-10-14  4:10                       ` Lars Ingebrigtsen
2016-07-23 17:11   ` Alex

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=83fur0x0ft.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23590@debbugs.gnu.org \
    --cc=agrambot@gmail.com \
    --cc=john.b.mastro@gmail.com \
    /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).