Skip to content

Instantly share code, notes, and snippets.

@krbullock
Created November 23, 2011 18:41
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 krbullock/1389506 to your computer and use it in GitHub Desktop.
Save krbullock/1389506 to your computer and use it in GitHub Desktop.
#!/bin/sh
emacsclient "$@"
if [[ $? -eq 1 ]]; then
/Applications/Emacs.app/Contents/MacOS/Emacs &
echo "Waiting for server socket to appear..."
until [[ -S "$TMPDIR/emacs$UID/server" ]]; do
sleep 0.5
done
emacsclient "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment