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

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

Opening stdin or pipe


From: Gregory J.
Subject: Opening stdin or pipe
Date: 24 Feb 2003 21:43:08 -0800

I want to be able to pipe data into an Emacs buffer (a new one in a
new Emacs session would be fine). Preferably, I'd use a normal shell
pipeline something like this:

whatever-command | emacs -

I'd be happy enough to use a named pipe like this, though:

mkfifo myfifo
whatever-command > myfifo &
emacs myfifo

It seems the first method is simply not supported (Error: "Option `-'
is ambiguous"). I would have expected the second method to work, but I
get this error: "File exists but cannot be read."

I searched the USENET archive and found this command suggested:

emacs /dev/stdin

(and /dev/stdin does exist under NetBSD), but I get the same error,
"File exists but cannot be read."

A workaround is to run:

mkfifo myfifo
whatever-command > myfifo &
emacs

and then within Emacs create a buffer and run "cat myfifo" via
shell-command (C-u M-!), but this is inconvenient.

Is there any way to accomplish what I described?


reply via email to

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