Skip to content

Instantly share code, notes, and snippets.

@caldwell
Created February 25, 2013 00:44
Show Gist options
  • Save caldwell/5026535 to your computer and use it in GitHub Desktop.
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.
#!/bin/sh
/Applications/Emacs.app/Contents/MacOS/Emacs "$@"
@naxels
Copy link

naxels commented Jan 12, 2023

@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.

@caldwell
Copy link
Author

caldwell commented Feb 9, 2023

@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