GNU bug report logs - #32093
27.0.50; M-x grep appends /dev/null to command line

Previous Next

Package: emacs;

Reported by: David Kastrup <dak <at> gnu.org>

Date: Sun, 8 Jul 2018 09:34:02 UTC

Severity: minor

Tags: fixed

Found in version 27.0.50

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: David Kastrup <dak <at> gnu.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 32093 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: bug#32093: 27.0.50; M-x grep appends /dev/null to command line
Date: Sun, 08 Jul 2018 14:30:26 +0200
Noam Postavsky <npostavs <at> gmail.com> writes:

> David Kastrup <dak <at> gnu.org> 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




This bug report was last modified 6 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.