From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.bugs Subject: bug#32093: 27.0.50; M-x grep appends /dev/null to command line Date: Sun, 08 Jul 2018 14:30:26 +0200 Message-ID: <878t6lewpp.fsf@fencepost.gnu.org> References: <87lgamdqcb.fsf@fencepost.gnu.org> <87pnzyawdg.fsf@gmx.de> <87h8ladpem.fsf@fencepost.gnu.org> <87lgamavq7.fsf@gmx.de> <87d0vydli6.fsf@fencepost.gnu.org> <87va9pdin0.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531052949 14001 195.159.176.226 (8 Jul 2018 12:29:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Jul 2018 12:29:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 32093@debbugs.gnu.org, Michael Albinus To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 08 14:29:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fc8oK-0003XO-Sx for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jul 2018 14:29:05 +0200 Original-Received: from localhost ([::1]:36924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fc8qQ-0002aT-BY for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jul 2018 08:31:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fc8qH-0002aN-3l for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2018 08:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fc8qD-0003lF-RJ for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2018 08:31:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42821) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fc8qD-0003l8-O1 for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2018 08:31:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fc8qD-00055F-JA for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2018 08:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Kastrup Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jul 2018 12:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32093 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32093-submit@debbugs.gnu.org id=B32093.153105303919512 (code B ref 32093); Sun, 08 Jul 2018 12:31:01 +0000 Original-Received: (at 32093) by debbugs.gnu.org; 8 Jul 2018 12:30:39 +0000 Original-Received: from localhost ([127.0.0.1]:50718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fc8pr-00054d-Eg for submit@debbugs.gnu.org; Sun, 08 Jul 2018 08:30:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fc8pq-00054Q-6d for 32093@debbugs.gnu.org; Sun, 08 Jul 2018 08:30:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fc8ph-0003bs-Hd for 32093@debbugs.gnu.org; Sun, 08 Jul 2018 08:30:32 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fc8ph-0003bo-ER; Sun, 08 Jul 2018 08:30:29 -0400 Original-Received: from x4db54f11.dyn.telefonica.de ([77.181.79.17]:55792 helo=lola) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fc8pg-0005JD-S1; Sun, 08 Jul 2018 08:30:29 -0400 In-Reply-To: <87va9pdin0.fsf@gmail.com> (Noam Postavsky's message of "Sun, 08 Jul 2018 08:19:47 -0400") 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:148338 Archived-At: Noam Postavsky writes: > David Kastrup writes: > >> This code actually is considerably old, older than what I remember >> having worked (though it's sort of hard to tell since the results of >> autodetection are stored in a session). So I consider it more likely >> that the more recent >> >> 644cdd1aa0a (Noam Postavsky 2016-09-13 646) (when (eq >> grep-use-null-filename-separator 'auto-detect) > >> is involved here. At any rate, the principal problem here is that "git >> grep" is a grep-like command that will usually refuse to work on >> out-of-tree files (unless --no-index option is given). So the results >> from any of the autodetection, based on searching the HELLO file, are >> sort-of random. > > The reason for the current breakage is actually the changes to the HELLO > file, the string "English" is no longer at the beginning of the line > since [1: 3589c966b7]. Ok, that's actually funny. > The reason the auto detection previously worked, despite HELLO not > being in the current git repository, is that the autodetection works > with plain "grep", not "git grep". Autodetection happens before you > get the prompt, so you haven't even typed in "git" yet. So basically previously the proposed grep command line and autodetection was working for me since both system grep and git-grep support -H . Now while it makes sense to fix the HELLO file problem, I feel that it's sort of unfortunate that /dev/null is silently tacked onto the command line after user entry completes as opposed to the flags which are entered previous to that. But I don't have a good idea how to do that while giving the user something sensible and editable to work with. -- David Kastrup