Carbon XEmacs

Introduction

Carbon XEmacs is my port of XEmacs to Mac OS X. It provides a native, Carbon implementation of the XEmacs GUI using the ATSUI, ATS, and Quartz 2D APIs and a set of “changes” to allow XEmacs to run under Mac OS X as a Carbon application. The development of this port was documented in my blog around January 2005.

I am not and have never been interested in providing support for Carbon XEmacs. So you should use it only if you know enough about (X)Emacs and OS X/Unix development tools to solve problems on your own. I no longer/do not participate in the GNU Emacs and XEmacs development projects nor read their mailing lists.

I have not worked on Carbon XEmacs actively for a long time. But I do still use it regularly to write Haskell/OCaml/Scheme code. And it works great for me. The latest version xemacs-21.5.28-carbon-b7.diff will probably be the last release I will made for quite some time. [Update 27 June 2009 - latest version: xemacs-21.5.29-carbon-b8.diff]

An alternative to Carbon XEmacs is “Carbon Emacs”, or Emacs for Mac OS X, which I also ported around 2002. Carbon Emacs is now part of the “CVS version” of GNU Emacs. You can also find its various “binary distributions” on the Web. See, for example, the MacEmacs JP project. [Update Sep. 2009: It seems that GNU Emacs 23 can only be built to run on Cocoa but not Carbon. While I don’t use GNU Emacs on Macs after my XEmacs port, I have a few choice words about this change. But I’ll save it for elsewhere. In the mean time, please also consider using Yamamoto’s Carbon+AppKit port, which preserves much of the mature Carbon code.]

Downloads

[Update: 28 September 2009.] It’s straightforward to add a couple of flags to build Carbon XEmacs in Snow Leopard. Apply this patch to the shell script carbon/build-app.sh before running it.

[28 September 2009.] Here’s a patch to lisp/font.el to allow Carbon XEmacs to run packages such as AUCTeX that create different size fonts.

Here’s the diff file for building Carbon XEmacs against version 21.5.29 of XEmacs: xemacs-21.5.29-carbon-b8.diff.bz2 (release date: 27 June 2009).

Note that you build Carbon XEmacs after applying the patch by executing the shell script build-app.sh in the carbon directory. Once built, you run it by double-clicking on or dropping a file onto the XEmacs application icon, also in that directory.

Here’re all the older diff files and patches if you need them for whatever reason. Here’s the old web page which explained what everything was.

Installation

I believe that if you decide to use Carbon XEmacs, you should in fact be able to build and install it without these instructions. So this description is provided “as a courtesy”. Please adapt it to your own OS/tool versions and pathnames. I will not answer any questions on it.

The following procedure has been tested on an Intel iMac running Mac OS X 10.5.7 with Xcode Tools version 3.1.1 installed.

Download and untar the file xemacs-21.5.29.tar.bz (or .gz) from one of the XEmacs mirrors.

Download and bunzip2 the file xemacs-21.5.29-carbon-b8.diff.bz.

Apply the patch. I.e., in the xemacs-21.5.29 directory, type:

patch -p1 < .../xemacs-21.5.29-carbon-b8.diff

Then in the xemacs-21.5.29/carbon directory, type:

sh < build-app.sh

You should then be able to start Carbon XEmacs by double-clicking on the xemacs-21.5.29/carbon/XEmacs.app application icon in the Finder.

[Optional] Install additional packages as follows.

Read the file README.packages in the xemacs-21.5.29 directory. In addition to the locations listed there, Carbon XEmacs will also find packages in the directory

XEmacs.app/Contents/Resources/lib/xemacs/

An XEmacs application bundle with packages installed in this directory is therefore self-contained and can be moved to a different location on the disk.

Another convenient directory to install your packages is ~/.xemacs.

If you just want all the packages installed, download the files:

xemacs-sumo-<date>.tar.bz2

xemacs-mule-sumo-<date>.tar.bz2

from the /packages/ directory in one of the XEmacs mirror sites. Untar them into one of the package directories.

Why Public Domain?

I placed the code I wrote for the Carbon XEmacs port in the public domain at the time it was released. The use of public domain code in a GPL program is perfectly in accordance with the GPL (see the GPL FAQ regarding the public domain and patches, for example). XEmacs itself is of course a program under the GPL.

I did this as a statement of my views on “software freedom” and the behavior of people who (claim to) advocate free software. I write programs for the love of programming. My primary objective is to write beautiful programs. “Free software people” have very different ideas about the purpose of computer programs, and software design and computer programming in general. After my encounter with the GNU Emacs “maintainers” when I did the Carbon Emacs port, I decided not to write any more GPL code, ever.

I must say I have found the XEmacs “maintainers” to be even less helpful, less knowledgeable, and on many occasions downright hostile, compared with their GNU Emacs counterparts. These people spread FUD about the legality of the code of my port and apparently saw nothing wrong with replacing my authorship and public domain notice with a GPL! That’s plagiarism! I still cannot determine whether they have acted in ignorance or malice. In either case, I will not dignify that by arguing with them publicly. People who write good and useful code deserve a certain respect. I am not demanding anything more, or less.