* grep command adds "NUL"
@ 2002-12-03 5:06 Leo
2002-12-03 6:13 ` Eli Zaretskii
2002-12-03 7:40 ` Kai Großjohann
0 siblings, 2 replies; 3+ messages in thread
From: Leo @ 2002-12-03 5:06 UTC (permalink / raw)
hello
i try using the grep-comand.
so i type:
M-x grep RET 'spider' *.pas
but emacs creates buffer *grep* with the following lines:
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?
ta for help.
cheers, leooo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: grep command adds "NUL"
2002-12-03 5:06 grep command adds "NUL" Leo
@ 2002-12-03 6:13 ` Eli Zaretskii
2002-12-03 7:40 ` Kai Großjohann
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2002-12-03 6:13 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: grep command adds "NUL"
2002-12-03 5:06 grep command adds "NUL" Leo
2002-12-03 6:13 ` Eli Zaretskii
@ 2002-12-03 7:40 ` Kai Großjohann
1 sibling, 0 replies; 3+ messages in thread
From: Kai Großjohann @ 2002-12-03 7:40 UTC (permalink / raw)
"Leo" <leo.broska@NOSPAM.isys.com.au> writes:
> looking in the elisp source tells me, that emacs wants to add a null-device.
> why that?
If you call grep with just one file name, then it will omit the file
name in the output. But for C-x ` you need to have the filename. So
the trick is to call grep with /dev/null as one of the file names.
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-03 7:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-03 5:06 grep command adds "NUL" Leo
2002-12-03 6:13 ` Eli Zaretskii
2002-12-03 7:40 ` Kai Großjohann
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.