Read from stdin to emacs
A simple shell function to allow emacsclients (or emacs) to read from stdin via a temp file.
sh. Everything should work with other modern shells (there's nothing fancy going on).
emacs rather than
emacsclient, or to modify the command line args used, change the
Set up by sourcing the file
emacs-read-stdin.sh in your
.bashrc (or equivalent) with
or by simply copying and pasting the two functions into
Read from stdin
echo "hello world" | e -
or as normal from files
Run the script
run-tests.sh to test the function. Check in the script for the expected output to compare against (I should probably rewrite the tests in python or something so that the checking can be easily automated).