emacs-devel
[Top][All Lists]
Advanced

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

Re: grep command doc - point out that you can chain now


From: Nick Roberts
Subject: Re: grep command doc - point out that you can chain now
Date: Wed, 19 Jul 2006 19:02:36 +1200

 >     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 via email to

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