Created
June 16, 2015 16:15
-
-
Save dvcrn/95b42a5c7c61860ea2af to your computer and use it in GitHub Desktop.
Launch Emacs.app or create a new window if already running
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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