Created
May 2, 2016 02:20
-
-
Save mrc/83ebe13d9e7eca61296deeacd6f54f16 to your computer and use it in GitHub Desktop.
Copy stdin to emacsclient
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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