Browsing code with Aquamacs Emacs

.. -- mode: rst --

I'm working with some C, C++, and Java code now, so it's time to get Emacs set up to do that nicely on my Mac. Getting all the pieces working was trickier than I expected, so here are some notes about it. I wanted to get a working setup that includes ECB (the Emacs Code Browser) and JDEE (the Java Development Environment for Emacs). Both of them use CEDET (the Collection of Emacs Development Environment Tools).

  1. Started off with a clean installation of Aquamacs, a nice adaptation of Emacs for Mac OS. The JDE plugin for Aquamacs is nice, but the current version of ECB needs a newer version of JDE, so I didn't install the plugin.
  2. Installed ant-contrib package for JDE to use::

sudo port install ant-contrib

Ant itself was already available.

  1. Checked CEDET out of subversion::

cvs login
cvs -z3 co -P cedet

  1. Followed instructions in cedet/USING_CEDET_FROM_CVS (The Mac ships with a terminal-based version of Emacs 22, which is good enough to compile the CEDET Lisp files.)::

cd cedet; make EMACS=emacs

  1. I started off with the basic CEDET configuration from the setup page.
  2. While I was at it, I installed Exuberant Ctags using MacPorts and enabled it in CEDET::


  1. Started up Aquamacs to make sure everything is working. (It's handy to run the terminal Emacs to work on the files while all this starting and exiting is going on…)
  2. Now install JDE dependency elib: download from the JDE SourceForge site. I am using the source directory directly instead of installing the package on the system, so just run make in the directory, and add the directory to my own load-path.
  3. Followed the directions in jde/doc/install.html
  4. Create a ~/ file for Ant to use::


  1. Configure and build with ant (double-check the file after configure)::

ant configure
ant build
ant dist

  1. Add the dist directory to my load-path.
  2. Add (load ”jde-autoload“) to Emacs startup.
  3. Checkout ECB and byte-compile it::

cvs -z3 co -P ecb
cd ecb
make CEDET=../cedet

The CEDET value should be wherever you have CEDET installed. I just pointed it to the source directory I'm using.

  1. Add the ECB directory to load-path. It's easiest to then add::

(require 'ecb)

for startup. I don't start Emacs that much, so it's cheap to do it that way. Besides, computers are fast now.

  1. Enjoy.