Skip to content

Instantly share code, notes, and snippets.

@jasonm23
Last active November 29, 2018 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonm23/8fad26d7bd7578503498e4db35355c97 to your computer and use it in GitHub Desktop.
Save jasonm23/8fad26d7bd7578503498e4db35355c97 to your computer and use it in GitHub Desktop.
shell function for Mac to open file(s) in emacs via Emacsclient or start a new Emacs app.
ec() {
emacsclient -n $@ 2> /dev/null
if [[ $? == 1 ]]; then
open -a Emacs.app -- $@
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment