unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
Cc: emacs-devel@gnu.org
Subject: Re: grep command doc - point out that you can chain now
Date: Wed, 19 Jul 2006 19:02:36 +1200	[thread overview]
Message-ID: <17597.55565.17696.172118@kahikatea.snap.net.nz> (raw)
In-Reply-To: <E1G35B8-00065K-Jh@fencepost.gnu.org>

 >     The default is computed by grep-compute-defaults.  The default command
 >     won't use the -H option if the user's version of grep doesn't have it.
 > 
 > What does it do?  Add /dev/null as input instead?

Yes.  If grep uses -H and it's valid, grep-use-null-device is set to nil.
Otherwise it's t.  The user could get piping to work by setting
grep-use-null-device to nil directly but that would mean that the filename
doesn't get included in the output when there was only one input file.

It's a bit awkward to explain in the manual.  You say "you can use any shell
command that produces output in the same format."  Yes, you could run "make"
through the grep buffer, and "grep" through the compile buffer.  You can run a
telnet session through the GUD buffer (and debug remotely), but I don't
think these things need be described in the manual.  Why not just extend the
existing entry in NEWS?:

  *** M-x grep now tries to avoid appending `/dev/null' to the command line
  by using GNU grep `-H' option instead.  M-x grep automatically
  detects whether this is possible or not the first time it is invoked.
  When `-H' is used, the grep command line supplied by the user is passed
  unchanged to the system to execute, which allows more complicated
  command lines to be used than was possible before.

-- 
Nick                                           http://www.inet.net.nz/~nickrob

  reply	other threads:[~2006-07-19  7:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-17  3:39 grep command doc - point out that you can chain now Drew Adams
2006-07-17  7:26 ` David Kastrup
2006-07-17  8:19   ` Nick Roberts
2006-07-17 15:28     ` Drew Adams
2006-07-17 17:59       ` Eli Zaretskii
2006-07-17 18:20         ` Drew Adams
2006-07-18  0:12     ` Richard Stallman
2006-07-18  2:30       ` Nick Roberts
2006-07-18  4:22         ` Drew Adams
2006-07-18  5:02           ` Nick Roberts
2006-07-18  5:53             ` Drew Adams
2006-07-18 15:00               ` Richard Stallman
2006-07-18 14:59         ` Richard Stallman
2006-07-18 21:12           ` Nick Roberts
2006-07-19  6:05             ` Richard Stallman
2006-07-19  7:02               ` Nick Roberts [this message]
2006-07-19  8:52                 ` Drew Adams
2006-07-19  9:05                   ` Nick Roberts
2006-07-19 21:15                 ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=17597.55565.17696.172118@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).