40
8
With Vim I can easily do
$ echo 123 | vim -
Is it possible to do with Emacs?
$ echo 123 | emacs23
... Emacs starts with a Welcome message
$ echo 123 | emacs23 -
... Emacs starts with an empty *scratch* buffer and “Unknown option”
$ echo 123 | emacs23 --insert -
... “No such file or directory”, empty *scratch* buffer
Is it really impossible to read a buffer from a unix pipe?
Edit: As a solution, I wrote a shell wrapper named emacspipe
:
#!/bin/sh
TMP=$(mktemp) && cat > $TMP && emacs23 $TMP ; rm $TMP
13I mean no disrespect to anyone, but this is abhorrent. This is a very basic editor feature and GNU EMACS has been around for decades. It should be built in. – user787832 – 2015-02-06T15:46:26.453