Skip to content

Instantly share code, notes, and snippets.

@apg
Forked from lancepantz/gist:654709
Created October 31, 2010 22:09
Show Gist options
  • Save apg/657226 to your computer and use it in GitHub Desktop.
Save apg/657226 to your computer and use it in GitHub Desktop.
# I use this on Linux:
#!/bin/bash
# e - launch emacsclient or server.
ps ax | grep "emacs --daemon" | grep -v "grep"
if [ "$?" -eq "1" ]
then
/usr/bin/emacs --daemon
fi
/usr/bin/emacsclient -c $@
On OSX, it probably works to do something similar, substituting paths:
/Applications/Emacs.app/Contents/MacOS/bin/emacsclient and
/Applications/Emacs.app/Contents/MacOS/Emacs
but, this is untested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment