From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: grep command adds "NUL" Date: Tue, 3 Dec 2002 08:13:31 +0200 (IST) Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1038896270 6352 80.91.224.249 (3 Dec 2002 06:17:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Dec 2002 06:17:50 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18J6NQ-0001eG-00 for ; Tue, 03 Dec 2002 07:17:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18J6Jo-0005Pe-00; Tue, 03 Dec 2002 01:14:04 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18J6JX-000585-00 for help-gnu-emacs@gnu.org; Tue, 03 Dec 2002 01:13:47 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18J6JQ-0004mT-00 for help-gnu-emacs@gnu.org; Tue, 03 Dec 2002 01:13:44 -0500 Original-Received: from is.elta.co.il ([199.203.121.2]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18J6JN-0004TA-00 for help-gnu-emacs@gnu.org; Tue, 03 Dec 2002 01:13:38 -0500 Original-Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id IAA15062 for ; Tue, 3 Dec 2002 08:13:31 +0200 (IST) X-Sender: eliz@is Original-To: help-gnu-emacs@gnu.org In-Reply-To: Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:4228 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4228 On Tue, 3 Dec 2002, Leo wrote: > cd C:/mydir/ > grep -n 'spider' *.pas NUL > spidermain.pas:368: 115 spider:= TSpider.Create; > grep: NUL: Permission denied > > grep exited abnormally with code 2 at Tue Dec 03 15:59:34 > > looking in the elisp source tells me, that emacs wants to add a null-device. > why that? It does so because ``normal'' (read: Posix-compliant) versions of Grep don't report file names when you run them on a single file. Adding the system null device makes the list of files be always at least 2 files long, so file names are reported. (Emacs needs the file names to let you jump to each match found by Grep.) Since you run Emacs on Windows, I'm guessing that your Grep is not Posix-compliant, perhaps from Borland? In that case, I suggest you find a port of GNU Grep and install it; then the problems will go away.