Skip to content

Instantly share code, notes, and snippets.

@asenchi
Forked from pfhawkins/emacs.sh
Created November 23, 2009 02:48
Show Gist options
  • Save asenchi/240858 to your computer and use it in GitHub Desktop.
Save asenchi/240858 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