Skip to content

Instantly share code, notes, and snippets.

@paxperscientiam
Created June 5, 2018 03:40
Show Gist options
  • Save paxperscientiam/82a7f28a555a4a441bcf665b99d0d5dd to your computer and use it in GitHub Desktop.
Save paxperscientiam/82a7f28a555a4a441bcf665b99d0d5dd to your computer and use it in GitHub Desktop.
emacs socket input
CMD=$'(mapcar '"'"'buffer-name (remove-if-not #'"'"'buffer-file-name (buffer-list)))'
read -r result < <(nc -U "${socket}" <<< \
$"-eval ${CMD// /&_}" | \
awk $'FNR == 2 {printf $2}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment