[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep-use-null-device
From: |
David Kastrup |
Subject: |
Re: grep-use-null-device |
Date: |
Tue, 16 Aug 2005 11:26:22 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Emilio Lopes <address@hidden> writes:
> Emilio Lopes writes:
>
>> As a result, if I forget to provide a filename to "M-x grep" it will
>> run forever, waiting for me to kill it.
>
> Richard M Stallman writes:
>
>> So, my grep program supports "-H" but it apparently has not the
>> expected semantics.
>
>> That is a very vague statement. It tells us nothing.
>
> No, no. It's very concrete if you consider the rest of the message,
> which you didn't quote. Anyway, I understand the problem better now.
>
> If the user forgets to provide a filename to "M-x grep" (as in
> "grep.-nH.foo") it will run indefinitely waiting for input from
> stdin until killed. In such cases it's useful to have `null-device'
> appended, even if the grep program supports the option "-H" (which
> has an other purpose anyway).
>
> One could even argue if Emacs should not append *two* instances of
> `null-device', in the case the use just press enter at the grep prompt
> without even typing a regexp.
I think what rather should be done is that standard input on the grep
process gets closed. That requires no special options, and it will
lead to a sensible result without obscure extra options.
grep-use-null-device is just for getting file names on matches, not
for dealing with bad commands.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Re: grep-use-null-device, (continued)
- Re: grep-use-null-device, Emilio Lopes, 2005/08/16
- Re: grep-use-null-device, Richard M. Stallman, 2005/08/17
- Re: grep-use-null-device, Eli Zaretskii, 2005/08/20
- "^D^H^H" in process output on Darwin (Was Re: grep-use-null-device), YAMAMOTO Mitsuharu, 2005/08/26
- Re: "^D^H^H" in process output on Darwin, Stefan Monnier, 2005/08/29
- Re: grep-use-null-device, Juri Linkov, 2005/08/29
- Re: grep-use-null-device, Richard M. Stallman, 2005/08/30
- Re: grep-use-null-device, Stefan Monnier, 2005/08/30
- Re: grep-use-null-device, Juri Linkov, 2005/08/31
Re: grep-use-null-device, Emilio Lopes, 2005/08/16