Skip to content

Instantly share code, notes, and snippets.

@pfhawkins
Created November 23, 2009 01:09
Show Gist options
  • Save pfhawkins/240824 to your computer and use it in GitHub Desktop.
Save pfhawkins/240824 to your computer and use it in GitHub Desktop.
em() {
daemonproc=$(ps faux | egrep "emacs --daemon" | egrep -vc "egrep")
if [ $daemonproc = 1 ]; then
emacsclient -t $1
else;
emacs --daemon
emacsclient -t $1
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment