Skip to content

Instantly share code, notes, and snippets.

@mrc
Created May 2, 2016 02:20
Show Gist options
  • Save mrc/83ebe13d9e7eca61296deeacd6f54f16 to your computer and use it in GitHub Desktop.
Save mrc/83ebe13d9e7eca61296deeacd6f54f16 to your computer and use it in GitHub Desktop.
Copy stdin to emacsclient
function ine() {
local tmpfile
tmpfile=$(mktemp "ine-XXXX.${1:-tmp}")
echo "$tmpfile"
touch "$tmpfile"
tee "$tmpfile"
emacsclient -n "$tmpfile"
( sleep 5 ; rm "$tmpfile" ) &
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment