OSX comes with a preinstalled version of Emacs, but alas it the oudated Emacs 22. Obtaining a newer Emacs on OS X is really simple. There are several popular ways to do it.

+

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 ==

== Emacs 24 ==

Line 7:

Line 7:

Simply download a binary from [http://emacsformacosx.com Emacs for OSX]

Simply download a binary from [http://emacsformacosx.com Emacs for OSX]

−

=== Build it from source ===

+

=== MacPorts ===

−

The second easy way to obtain Emacs 24 is via [http://mxcl.github.com/homebrew/ homebrew]. Just type the following incantation in your shell and you’re done:

+

If you have [https://www.macports.org/ MacPorts] installed, you can just do:

+

+

<source lang="bash">

+

$ sudo port install emacs

+

</source>

+

+

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:

+

+

<source lang="bash">

+

$ sudo port install emacs-app

+

</source>

+

+

=== Homebrew ===

+

+

Emacs 24 is also available via [http://mxcl.github.com/homebrew/ homebrew]. Just type the following incantation in your shell and you’re done:

<source lang="bash">

<source lang="bash">

$ brew update

$ brew update

$ brew install emacs --cocoa

$ brew install emacs --cocoa

−

$ cp -r /usr/local/Cellar/emacs/HEAD/Emacs.app /Applications/

+

$ ln -s /usr/local/Cellar/emacs/24.3/Emacs.app /Applications

+

or

+

$ cp -r /usr/local/Cellar/emacs/24.3/Emacs.app /Applications/

</source>

</source>

The second step is optional, but it’s recommended if you like to start Emacs from the launchpad or from Spotlight.

The second step is optional, but it’s recommended if you like to start Emacs from the launchpad or from Spotlight.

Line 24:

Line 40:

$ sudo rm -rf /usr/share/emacs

$ sudo rm -rf /usr/share/emacs

</source>

</source>

−

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

−

== Emacs 23 ==

+

Or just create an alias in your shell and when you invoke 'emacs' it will run the newly installed version:

A near-OS-X-native port of GNU Emacs, integrating Emacs with all the features of Mac OS X.

+

A near-OS-X-native port of GNU Emacs, integrating Emacs with all the features of Mac OS X. Available [http://aquamacs.org/ here]. As of this writing, the latest version (2.4) is based on Emacs 23.3. Comes bundled with some handy packages like [[AUCTeX]].

Emacs 24

As a binary package

MacPorts

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 24 is also available via homebrew. Just type the following incantation in your shell and you’re done:

Emacs 23

Aquamacs

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