Archive for the ‘Emacs’ Category

Emacs.app on Mac OS X Snow Leopard 10.6

Update: A 64-bit version of Emacs can now be compiled from source.

With the release of Snow Leopard, the included Emacs binary was not compiled with Carbon or Cocoa support. So, if a native OS X GUI is desired, compiling your own Emacs.app may be worthwhile. That’s the route I’ve taken. The Emacs developers are making improvements to the Cocoa version while dropping support for Carbon, and a 64-bit version should be able to compile from source. I’ll update this post as I tweak my Emacs.app on Snow Leopard.

64-bit Version

Download the the “latest” source from http://savannah.gnu.org/projects/emacs (I personally used git. Known checkouts to work: Oct 12, 2009, Oct 24, 2009):

$ git clone git://git.savannah.gnu.org/emacs.git

Run ‘./configure’:

$ cd emacs
$ ./configure --with-ns

Compile and create Emacs.app:

$ make install

Move ‘./emacs/nextstep/Emacs.app’ to ‘/Applications/’:

$ mv ./nextstep/Emacs.app /Applications/

32-bit Version

If the 64-bit version doesn’t compile, you can compile a 32-bit version by doing:

$ CC="gcc -arch i386" ./configure --with-ns

Note: There is more information about compiling a 64-bit version of Emacs.app at this blog post, this mailing list thread, and this blog post.

Emacs.app on Mac OS X Leopard

Update: I have another blog post for Mac OS X Snow Leopard.

I’ve been using Mac OS X Leopard for about a day now. The unfortunate thing that I discovered was that Leopard’s X11 support is not quite working yet. There are issues with Inkscape and Gimp, and I couldn’t get Emacs to work in X11. This encouraged me to find a better way to get Emacs into a windowed environment, and I ended up being able to create (uh, copy) an Emacs.app.

To create an Emacs.app, do the following:

Download the Emacs source code. Note: Leopard comes with emacs 22.1.1 (uses Carbon), so you want to download emacs-22.1.tar.gz. However, instead of downloading the entire source code, you can download just the Emacs.app from me here to save GNU 36MB of bandwidth.

Extract the files.

$ tar zxvf emacs-22.1.tar.gz

Go to the ‘emacs-22.1/mac’ directory

$ cd emacs-22.1/mac

Copy ‘Emacs.app’ to ‘/Applications/’

$ sudo cp -r Emacs.app /Applications/

Symlink /usr/bin/emacs to /Applications/Emacs.app/Contents/MacOS/emacs

$ ln -s /usr/bin/emacs /Applications/Emacs.app/Contents/MacOS/emacs

And, you may want to change the ownership on the Emacs.app

$ sudo chown -R root:admin /Applications/Emacs.app

That’s it. You should now be able to launch Emacs.app as a regular Mac application.