From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23590: 25.0.94; Errors in default lgrep command Date: Sat, 23 Jul 2016 10:45:10 +0300 Message-ID: <83fur0x0ft.fsf@gnu.org> References: <87futcp8wp.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1469259989 8301 80.91.229.3 (23 Jul 2016 07:46:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jul 2016 07:46:29 +0000 (UTC) Cc: 23590@debbugs.gnu.org, agrambot@gmail.com To: John Mastro Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 23 09:46:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bQrdX-000378-5a for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jul 2016 09:46:15 +0200 Original-Received: from localhost ([::1]:50672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQrdW-0005bo-9O for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jul 2016 03:46:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQrdN-0005aR-6X for bug-gnu-emacs@gnu.org; Sat, 23 Jul 2016 03:46:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQrdK-0004Qh-3V for bug-gnu-emacs@gnu.org; Sat, 23 Jul 2016 03:46:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQrdK-0004Qa-01 for bug-gnu-emacs@gnu.org; Sat, 23 Jul 2016 03:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bQrdJ-0007zj-PK for bug-gnu-emacs@gnu.org; Sat, 23 Jul 2016 03:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jul 2016 07:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23590 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23590-submit@debbugs.gnu.org id=B23590.146925991330675 (code B ref 23590); Sat, 23 Jul 2016 07:46:01 +0000 Original-Received: (at 23590) by debbugs.gnu.org; 23 Jul 2016 07:45:13 +0000 Original-Received: from localhost ([127.0.0.1]:34167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQrcW-0007yg-Dr for submit@debbugs.gnu.org; Sat, 23 Jul 2016 03:45:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQrcU-0007yT-Nq for 23590@debbugs.gnu.org; Sat, 23 Jul 2016 03:45:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQrcO-000413-Hi for 23590@debbugs.gnu.org; Sat, 23 Jul 2016 03:45:05 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQrcK-00040U-Qa; Sat, 23 Jul 2016 03:45:00 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2366 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bQrcJ-0006Ms-M4; Sat, 23 Jul 2016 03:45:00 -0400 In-reply-to: (message from John Mastro on Fri, 22 Jul 2016 19:16:27 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121441 Archived-At: > From: John Mastro > Date: Fri, 22 Jul 2016 19:16:27 -0700 > Cc: Alex > > Alex 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.