Created
February 25, 2013 00:44
-
-
Save caldwell/5026535 to your computer and use it in GitHub Desktop.
I put this little script my PATH so that I can call emacs from the command line and have it launch Emacs.app and not the built in emacs.
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
#!/bin/sh | |
/Applications/Emacs.app/Contents/MacOS/Emacs "$@" |
@caldwell , could you update the Tips And Tricks to also mention that the script should be executable chmod +x emacs
else it won't work.
For everyone else, I've gone a different route that mimics the way other apps create references in the path:
(make sure to use a user account that can become superuser/admin)
sudo ln -s /Applications/Emacs.app/Contents/MacOS/Emacs /usr/local/bin/emacs
This way you don't have to worry about cli args as the original executable will take care of it.
@naxels Yeah, that's probably much easier. I've changed it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I suggest using
instead because it also works when Emacs is already open (the one above makes a second Emacs app show up in my Dock). It also seems to be better than
or similar
emacsclient
stuff because it also works when Emacs is not running. The last one only opens Emacs but does not open the file when Emacs is not running.