Installing GNU Emacs

1 minute read

On Mac OS X it is just a breeze to install GNU Emacs, either the stable or the development version.

I am assuming you have the wonderful HomeBrew installed. First, as always when installing anything, make sure you are up to date:

$ brew update

The formula has a bunch of options that you can use to tweak your version. Most of the time you will not want to change these.

$ brew info
emacs: stable 24.5 (bottled), devel 25.0.92, HEAD
GNU Emacs text editor
/usr/local/Cellar/emacs/24.5 (3,923 files, 110.5M) *
  Built from source with: --with-cocoa --with-gnutls --with-imagemagick
==> Dependencies
Build: xz ✔, pkg-config ✔
Optional: d-bus ✘, gnutls ✔, librsvg ✘, imagemagick ✔, mailutils ✘, glib ✘
==> Options
	Build a Cocoa version of emacs
	Don't remove the ctags executable that emacs provides
	Build with d-bus support
	Build with glib support
	Build with gnutls support
	Build with imagemagick support
	Build with librsvg support
	Build with mailutils support
	Build with x11 support
	Don't build with libxml2 support
	Install development version 25.0.92
	Install HEAD version

I, however, want to enable the (highly recommended!) you need to add the cocoa build. While we are at it, we will also enable gnutls and imagemagick for a better experience.

$ brew install emacs --with-cocoa --with-gnutls --with-imagemagick

On my machine it too 2 minutes 42 seconds to do the full installation. Brew will take care of all the dependencies and the compiling.

Finally you will want to make the available in the Applications folder. Brew also facilitates this by providing the linkapps functionality.

$ brew linkapps emacs
Linking /usr/local/opt/emacs/ to /Applications.

If you want to install into your ~/Applications folder instead, then you need to create your own symbolic link.

$ ln -s /usr/local/Cellar/emacs/24.5/ ~/Applications/

That is it. It is very easy and allows you to stay up-to-date using Brew.


Alternatively you can download a prebuild package from EmacsForMacOSX. This package also contains a lot of sane defaults.

A bonus for this method is the availability of pretest and nightly builds (same as devel with Brew).