GNU bug report logs - #46801
Autodetection of grep-use-null-device

Previous Next

Package: emacs;

Reported by: <david.chappaz <at> free.fr>

Date: Fri, 26 Feb 2021 17:57:01 UTC

Severity: minor

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: <david.chappaz <at> free.fr>
To: 46801 <at> debbugs.gnu.org
Subject: bug#46801: Autodetection of grep-use-null-device 
Date: Fri, 26 Feb 2021 09:10:51 -0800
[Message part 1 (text/plain, inline)]
Hi,

 

Here is a simple recipe:

 

1/ Start emacs with --no-init

 

2/ Check that grep-use-null-device is set to 'auto-detect'

 

3/ Execute non-interactively

(grep "grep --color -nH --null -e something")

 

The command that's echoed in the grep buffer is:

grep --color -nH --null -e something /dev/null

 

4/ I can see that grep-use-null-device has been set to nil

 

This suggests that automatic detection of grep-use-null-device

has taken place. Is this expected after non-interactive invocation ?

 

The documentation seems to suggest that automatic detection of

grep-use-null-device should  take place on the first *interactive*

call, but not before that. Perhaps I don't read the documentation

correctly though, it's very possible !

 

However, if automatic detection of grep-use-null-device after
non-interactive 

Invocation is the correct behavior, then why was /dev/null added to the

command despite grep-use-null-device being set to nil ?

5/ Execute non-interactively the same command again:

(grep "grep --color -nH --null -e something")

 

The command that's echoed in the grep buffer now is:

grep --color -nH --null -e something

 

This time round, /dev/null is not present. At least this is consistent with

grep-use-null-device being set to nil.

What doesn't seem right is that the echoed command is not the same as

that from step 3/

 

Any thoughts or comments ?

Thanks !

David

[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 79 days ago.

Previous Next


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