Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Launch Emacs.app or create a new window if already running
emacs () {
PROCESS=Emacs
number=$(ps aux | grep $PROCESS | wc -l)
if [ $number -gt 1 ]
then
emacsclient -c -n $1
else
open -a /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.8/Emacs.app $1
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment