From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emilio Lopes Newsgroups: gmane.emacs.devel Subject: Re: grep-use-null-device Date: Tue, 16 Aug 2005 09:15:07 +0200 Organization: private Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=latin-iso8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1124183722 7530 80.91.229.2 (16 Aug 2005 09:15:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Aug 2005 09:15:22 +0000 (UTC) Cc: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 16 11:15:19 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E4xWB-0004lc-HW for ged-emacs-devel@m.gmane.org; Tue, 16 Aug 2005 11:13:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E4xYG-00075I-Hy for ged-emacs-devel@m.gmane.org; Tue, 16 Aug 2005 05:16:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E4wQa-0002eD-KE for emacs-devel@gnu.org; Tue, 16 Aug 2005 04:04:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E4wPt-0002ah-Ht for emacs-devel@gnu.org; Tue, 16 Aug 2005 04:03:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E4wNc-0001ur-0a for emacs-devel@gnu.org; Tue, 16 Aug 2005 04:01:05 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1E4wMg-0000TD-BP for emacs-devel@gnu.org; Tue, 16 Aug 2005 04:00:06 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1E4w5t-0002sK-25 for emacs-devel@gnu.org; Tue, 16 Aug 2005 09:42:45 +0200 Original-Received: from p62.246.7.106.tisdip.tiscali.de ([62.246.7.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Aug 2005 09:42:45 +0200 Original-Received: from eclig by p62.246.7.106.tisdip.tiscali.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Aug 2005 09:42:45 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 25 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p62.246.7.106.tisdip.tiscali.de User-Agent: Emacs Gnus Cancel-Lock: sha1:VX+UQbyNYnVS2wG4Afhh2r4Sc84= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:42108 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:42108 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.