Difference between revisions of "Installing Emacs on OS X"

From WikEmacs
Jump to navigation Jump to search
m (moved OS X to Installing Emacs on OS X: clearer name)
Line 1: Line 1:
Obtaining Emacs 24 on OS X is really simple. There are several popular ways to do it.  
+
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.  
  
==== As a binary package ====
+
== Emacs 24 ==
 +
 
 +
=== As a binary package ===
  
 
Simply download a pretest (or a nightly build) from [http://emacsformacosx.com Emacs for OSX].  Probably the best option would be to get the latest pretest from [http://emacsformacosx.com/builds here].
 
Simply download a pretest (or a nightly build) from [http://emacsformacosx.com Emacs for OSX].  Probably the best option would be to get the latest pretest from [http://emacsformacosx.com/builds here].
  
==== Build it from source ====
+
=== Build it from source ===
  
 
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:
 
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:
Line 23: Line 25:
 
That’s all folk! You may now proceed to the configuration section.
 
That’s all folk! You may now proceed to the configuration section.
  
==== Use a package manager (Emacs 23 only at time of writing) ====
+
== Emacs 23
 +
 
 +
=== As a binary package ===
 +
 
 +
Simply download a binary from [http://emacsformacosx.com Emacs for OSX].
 +
 
 +
=== Use a package manager (Emacs 23 only at time of writing) ===
  
 
* Fink
 
* Fink
Line 39: Line 47:
 
The gtk, motif and x11 variants require (depend on) MacPorts' X11 libraries. They're mutually exclusive.
 
The gtk, motif and x11 variants require (depend on) MacPorts' X11 libraries. They're mutually exclusive.
  
==== Download and install [http://aquamacs.org Aquamacs] ====
+
== Aquamacs ==
  
 
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.
  
 
[[Category:OS X]][[Category:Beginner]][[Category:Install Or Upgrade]][[Category:Emacs-23]][[Category:Emacs-23.4]][[Category:Emacs-24]]
 
[[Category:OS X]][[Category:Beginner]][[Category:Install Or Upgrade]][[Category:Emacs-23]][[Category:Emacs-23.4]][[Category:Emacs-24]]

Revision as of 12:54, 23 April 2012

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.

Emacs 24

As a binary package

Simply download a pretest (or a nightly build) from Emacs for OSX. Probably the best option would be to get the latest pretest from here.

Build it from source

The second easy way to obtain Emacs 24 is via homebrew. Just type the following incantation in your shell and you’re done:

$ brew install emacs --cocoa --use-git-head --HEAD
$ cp -r /usr/local/Cellar/emacs/HEAD/Emacs.app /Applications/

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

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 folk! You may now proceed to the configuration section.

== Emacs 23

As a binary package

Simply download a binary from Emacs for OSX.

Use a package manager (Emacs 23 only at time of writing)

  • Fink
  • MacPorts
port install emacs

You can add +<variant> [+<variant>...] where variant is one or more of:

  • dbus: Builds emacs with D-Bus support
  • gtk: Builds emacs as an X11 program with GTK+2 widgets
  • motif: Builds emacs as an X11 program with Motif
  • universal: Build for multiple architectures
  • x11: Builds emacs as a X11 program with Lucid widgets

The gtk, motif and x11 variants require (depend on) MacPorts' X11 libraries. They're mutually exclusive.

Aquamacs

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