Installing Emacs on OS X

From WikEmacs
Revision as of 23:45, 26 December 2020 by Antoinell (talk | contribs) (→‎Emacs 27)
Jump to navigation Jump to search

OS X comes with a preinstalled version of Emacs, but alas it is the outdated Emacs 22. Fortunately, obtaining a newer release is really simple. There are several popular ways to do it.

Emacs 24

As a binary package

Simply download a binary from Emacs for OSX.

The above binary distribution bundled with up-to-date versions AUCTeX, ESS and a few other useful tools is available from Vincent Goulet's web site.

MacPorts

If you have MacPorts installed, you can just do:

$ sudo port install emacs

to install Emacs 24. The MacPorts installer updates your PATH environment variable, so the MacPorts build of Emacs should be found by your shell before the (outdated) build that comes with Mac OS when you type 'emacs'. If you prefer the Emacs.app build, that's available by executing:

$ sudo port install emacs-app

Homebrew

Emacs 27 is also available via [1]. Just type the following incantation in your shell and you’re done:

$ brew update
$ brew install emacs

Chances are good you have an older version of Emacs installed by default with OS X. It's suggested you to remove that older Emacs version to avoid conflicts with the new one. Do this:

$ sudo rm /usr/bin/emacs
$ sudo rm -rf /usr/share/emacs


That’s all folks! You may now proceed to the configuration section.

Homebrew recommended by brew

Brew now recommends emacs to be installed as

brew cask install emacs

But that doesn't create /usr/local/bin/emacs.

You may follow Emacs for Mac OS X, Tips on how to create scripts for running emacs and emacsclient.

Rudix

Emacs is easy to install directly from Rudix as a .pkg or with the Rudix command line tool:

% sudo rudix install emacs

Emacs 27

Binaries for Emacs 27 are still available from Emacs for OSX.

Aquamacs

A near-OS-X-native port of GNU Emacs, integrating Emacs with all the features of Mac OS X. Available here. As of January 2015, the latest version (3.2) is based on Emacs 24.4. Comes bundled with some handy packages like AUCTeX.