help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unexpected behavior of grep-use-null-device in non-interactive mode


From: david.chappaz
Subject: Unexpected behavior of grep-use-null-device in non-interactive mode
Date: Mon, 22 Feb 2021 15:00:24 -0800

Hi,

 

I'm using emacs 27.1.

 

Here is a simple experiment in interactive mode:

 

1/ Start emacs with --no-init

2/ I can check that grep-use-null-device is set to 'auto-detect'

3/ Run interactively M-x grep, something. The command that's echoed in the
grep buffer is:

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

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

 

So far so good. Now consider the non-interactive variant:

 

1/ Start emacs with --no-init

2/ I can check that grep-use-null-device is set to 'auto-detect'

3/ Now I 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 check that grep-use-null-device has been set to nil

5/ If I execute non- interactively the same (grep "grep --color -nH --null
-e something"), the command that's echoed in the grep buffer now is:

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

 

Why is /dev/null added to the command at step 3 ?

Is this a bug ? Or perhaps my expectations are not quite right ?

 

Thanks !

David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]