This has got to be a silly question...

From a terminal window, to start emacs which comes with mac osx (version 22.1.1), I just type

> emacs

First set of questions: where is this emacs installed? where is the alias defined?

Now, I just discovered (!) how old this version is, and so I installed the latest version from http://emacsformacosx.com. When I type

> emacs

I still launch the old version (22.1.1) and not the new one. On the other hand, if I type in a terminal window

open -a emacs

then the new version (25.3.1) is launched.

Second set of questions: why is that? where is the alias for this other emacs? how does the system choose which version to launch?

2 Answers 2


It is one question per customer / thread ...

As to the first question, the great thing about Emacs from https://emacsformacosx.com/ is that it is a self-contained installation. The executable is inside the packaged Emacs.app wherever you installed it.

If you placed the Emacs.app inside the root /Applications folder, then your path to the Emacs executable is: /Applications/Emacs.app/Contents/MacOS/Emacs

If you placed the Emacs.app inside the root /Applications folder, then your path to the emacsclient executable is: /Applications/Emacs.app/Contents/MacOS/bin/emacsclient

[Within ../Emacs.app/Contents/MacOS/.. I see multiple different builds for various versions of OSX. I have only ever used the generic executables at the paths listed above. Feel free to try out an OSX version specific executable that matches your system version type ...]

OSX ships with an outdated version of Emacs with an absolute path of /usr/bin/emacs

You can always type the absolute path in the terminal to the desired Emacs executable, or you can set up an alias (which is a different question beyond the scope of the one question per customer / thread general rule).

For the location of executables within the $PATH of the terminal, you can type which NAME_OF_EXECUTABLE -- in this example, typing which emacs in the terminal produces a result of /usr/bin/emacs.

  • Thanks, that helps a lot! Sorry, I was only being rhetorical when I asked "two" questions. There really was only one: how do two versions of emacs coexist. As to creating an alias, note that I did not ask the question how to do that in the post, as evidently this is a completely different question - and one that has nothing to do with emacs (in fact like my original question(s)!)
    – Antoine
    Feb 21, 2018 at 23:12

I don't know how the system knows which version to launch, but to open the newly installed Emacs from terminal, type emacs23.

  • I would still like to understand how things work. In fact, when I type emacs23, it doesn't work, because I haven't defined the alias emacs23 for the version of emacs that I want. And that brings another question, which is where and how to define such aliases, but I have to dig a little bit more before posting a question...
    – Antoine
    Feb 21, 2018 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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