epipe for piping shit into emacs buffers

This commit is contained in:
i.ortega 2020-04-30 02:35:47 +02:00
parent 30c4ebe334
commit 97739a7b8e
1 changed files with 13 additions and 0 deletions

13
bin/epipe Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
temp=$(mktemp)
text=$(cat)
echo "$text" > "$temp"
read -r -d '' lisp <<EOF
(switch-to-buffer (generate-new-buffer-name "*pipe*"))
(insert-file-contents "$temp")
EOF
emacsclient --eval "(progn $lisp $1)"
rm "$temp"