all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: al.coyote@gmail.com
To: help-gnu-emacs@gnu.org
Subject: How to avoid  /dev/null at the end of grep-command
Date: 2 Mar 2007 01:20:35 -0800	[thread overview]
Message-ID: <1172827235.116923.127160@31g2000cwt.googlegroups.com> (raw)

Hello,

When running M-x grep, emacs adds a /dev/null after the list of files.
That's a secure idea most of the times, but when running complex grep
command, this is annoying. For example something like:

grep -n -A2 my_function  *  |  grep -n '\n'

won't work, as emacs will transform this command as

grep -n -A2 my_function  *  |  grep -n '\n' /dev/null

I can add /dev/stdin to the second grep, but the file name will be
garbaged too.

Setting a default grep command does not solve the problem.

Any solution to avoid the /dev/null, without modifying compile.el ?

Thanks in advance.

Al

             reply	other threads:[~2007-03-02  9:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-02  9:20 al.coyote [this message]
2007-03-02 13:49 ` How to avoid /dev/null at the end of grep-command Eli Zaretskii
     [not found] ` <mailman.334.1172843352.7795.help-gnu-emacs@gnu.org>
2007-03-03  8:09   ` al.coyote
2007-03-03 10:26     ` 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=1172827235.116923.127160@31g2000cwt.googlegroups.com \
    --to=al.coyote@gmail.com \
    --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.