3

I find running the following is different from just running emacs on mac

/Applications/Emacs.app/Contents/MacOS/Emacs -nw

Should I create an alias in zsh/bash for it?

1
  • 2
    I open the Emacs.app just like any ordinary mac apps via Dock, Launchpad, Spotlight etc. I don't use Emacs inside a terminal. The builtin /usr/bin/emacs is too old. Feel free to create an alias for it.
    – xuchunyang
    Nov 9 '19 at 16:25
3

Just to expand on @ghoetker's answer:

  1. Install Emacs into your application folder from https://emacsformacosx.com/
  2. Using the terminal, open the file ~/.zshrc in your favorite text editor.
  3. Somewhere near the bottom of the file, add the line: alias emacs='$(/Applications/Emacs.app/Contents/MacOS/Emacs "$@")'
  4. Restart the terminal, or type source ~/.zshrc

From now on, typing emacs will open up Emacs in the Finder.

4

Yes. An alias to the binary within Emacs.app is useful and will allow to call an up-to-date version of emacs from the terminal via “emacs”. I have the following set up

alias emacs='$(/Applications/Emacs.app/Contents/MacOS/Emacs "$@")'
1
  • How do I enable the -nw option when I want to open emacs within the terminal? Apr 23 at 18:42
3

Applying Dave Kanter's recipe, I still run into trouble: "Emacs" can't be opened because Apple cannot check it for malicious software.

To get it to run, I had to open Settings, Settings, Security & Privacy, General tab and there give Emacs permission to open anyway, at my own risk.

Now I can run Emacs from the command line, albeit without options or arguments (no file name, no -nw option...).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.