help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: grep command adds "NUL"


From: Eli Zaretskii
Subject: Re: grep command adds "NUL"
Date: Tue, 3 Dec 2002 08:13:31 +0200 (IST)

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.





reply via email to

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