It took me a bit to get my Aquamacs install up and ready to do Clojure and SLIME, so I figured I’d jot some notes down for future me and anyone who happens to be listening.
I assume Aquamacs has been downloaded and
leiningen is installed. First,
in a terminal, you’ll need to install swank-clojure. As of today, the
current version is 1.4.0, but I strongly recommend you check the README
to see if there’s a new version out. In the shell,
lein plugin install swank-clojure "1.4.0".
I use Marmalade for package management, so
the first thing to do is to add Marmalade to Aquamacs. Open up
"~/Library/Preferences/Aquamacs\ Emacs/Preferences.el" in your editor
of choice (I used MacVim), and add
the folowing:
1 2 3 4 5 | |
I’m assuming you don’t have package.el installed yet, so make sure to
1
| |
Now fire up Aquamacs (or evaluate the additions to Preferences.el with
C-x C-e. clojure-mode needs to be installed, either via M-x package-list-packages,
and marking clojure-mode for installation (with i) and installing
(with x), or with M-x package-refresh-contents followed by
M-x package-install clojure-mode. I also like paredit but you
might not, it takes some getting used to.
Now, open up a file in your lein’d project and use M-x clojure-jack-in.
You might see some errors pop up in your *Compile-Log* buffer, but you
should be very shortly greeted with a REPL.
Happy hacking!
The End Result
Here’s a screenshot of how it turned out (click to view it full-size):

I usually run aquamacs full-screen with two panes, left-side for editing source code and right-size for SLIME.
References
I patched together my knowledge from a couple of pages:
- Incanter’s article Setting up Clojure, Incanter, Emacs, Slime, Swank, and Paredit
- The Doctor What’s article Aquamacs 2.3a and Marmalade
- Phil Hagelberg’s swank-clojure README