all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <david.chappaz@free.fr>
To: 46801@debbugs.gnu.org
Subject: bug#46801: Autodetection of grep-use-null-device
Date: Fri, 26 Feb 2021 09:10:51 -0800	[thread overview]
Message-ID: <055601d70c62$57d58ba0$0780a2e0$@free.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 4254 bytes --]

             reply	other threads:[~2021-02-26 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26 17:10 david.chappaz [this message]
2021-02-27  5:03 ` bug#46801: Autodetection of grep-use-null-device Lars Ingebrigtsen
2021-02-28  1:39   ` david.chappaz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='055601d70c62$57d58ba0$0780a2e0$@free.fr' \
    --to=david.chappaz@free.fr \
    --cc=46801@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.