unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* grep-use-null-device
@ 2005-08-15 15:41 Emilio Lopes
  2005-08-16  2:25 ` grep-use-null-device Richard M. Stallman
  2005-08-16  7:15 ` grep-use-null-device Emilio Lopes
  0 siblings, 2 replies; 22+ messages in thread
From: Emilio Lopes @ 2005-08-15 15:41 UTC (permalink / raw)


The documentation of this variable says:

   grep-use-null-device's value is nil

   If t, append the value of `null-device' to `grep' commands.
   This is done to ensure that the output of grep includes the filename of
   any match in the case where only a single file is searched, and is not
   necessary if the grep program used supports the `-H' option.

   The default value of this variable is set up by `grep-compute-defaults';
   call that function before using this variable in your program.

   You can customize this variable.

   Defined in `grep'.


If I understood it right, it says that I don't need a "/dev/null"
appended to my grep commands if my grep program supports the
option "-H".

Let's see:

   ~% grep --version
   grep (GNU grep) 2.5.1

   Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
   This is free software; see the source for copying conditions. There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

   ~% grep --help | grep -- -H
     -H, --with-filename       print the filename for each match

So, my grep program supports "-H" but it apparently has not the
expected semantics.

As a result, if I forget to provide a filename to "M-x grep" it will run
forever, waiting for me to kill it.

Do I have the "wrong" grep?

Is there a case where having a `null-device' too much will hurt?

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2005-09-17  1:33 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-15 15:41 grep-use-null-device Emilio Lopes
2005-08-16  2:25 ` grep-use-null-device Richard M. Stallman
2005-08-16 11:46   ` grep-use-null-device Karl Chen
2005-08-16 16:20     ` grep-use-null-device Emilio Lopes
2005-08-17  6:25       ` grep-use-null-device Richard M. Stallman
2005-08-20 12:22         ` grep-use-null-device Eli Zaretskii
2005-08-27  1:30           ` "^D^H^H" in process output on Darwin (Was Re: grep-use-null-device) YAMAMOTO Mitsuharu
2005-08-29 13:56             ` "^D^H^H" in process output on Darwin Stefan Monnier
2005-09-13  8:21             ` Nozomu Ando
2005-09-17  1:33               ` YAMAMOTO Mitsuharu
2005-08-29 22:43           ` grep-use-null-device Juri Linkov
2005-08-30 10:30             ` grep-use-null-device Richard M. Stallman
2005-08-31  2:31             ` grep-use-null-device Stefan Monnier
2005-08-31  6:02               ` grep-use-null-device Juri Linkov
2005-09-01 14:59                 ` grep-use-null-device Stefan Monnier
2005-09-01 16:16                   ` grep-use-null-device David Kastrup
2005-09-01 18:18                     ` grep-use-null-device Stefan Monnier
2005-09-03  1:43                     ` grep-use-null-device Richard M. Stallman
2005-08-16  7:15 ` grep-use-null-device Emilio Lopes
2005-08-16  9:26   ` grep-use-null-device David Kastrup
2005-08-16 16:29     ` grep-use-null-device Emilio Lopes
2005-08-16  9:45   ` grep-use-null-device Juri Linkov

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).