From: <david.chappaz@free.fr>
To: <help-gnu-emacs@gnu.org>
Subject: Unexpected behavior of grep-use-null-device in non-interactive mode
Date: Mon, 22 Feb 2021 15:00:24 -0800 [thread overview]
Message-ID: <030c01d7096e$82aa7260$87ff5720$@free.fr> (raw)
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
next reply other threads:[~2021-02-22 23:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-22 23:00 david.chappaz [this message]
2021-02-23 17:24 ` Unexpected behavior of grep-use-null-device in non-interactive mode Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2021-02-24 2:47 david.chappaz
2021-02-24 16:53 ` Eli Zaretskii
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='030c01d7096e$82aa7260$87ff5720$@free.fr' \
--to=david.chappaz@free.fr \
--cc=help-gnu-emacs@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.