I used Aquamacs so far, and I need to install and run Clojure using SLIME. I googled to get some way to use Clojure on SLIME of Aquamacs, but without success.
I tried with Mac OS X Emacs, and by following the steps I could make it work. I mean, I could run Clojure with SLIME.
Step 1) Install ESK.
.emacs.d
directory.emacs
and relaunch(when (load (expand-file-name "~/.emacs.d/package.el")) (package-initialize))
Step2) Install using ELPA
.emacs
and relaunch;; clojure mode (add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/clojure-mode-1.7.1") (require 'clojure-mode-autoloads) (add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/clojure-test-mode-1.4") (require 'clojure-test-mode-autoloads) ;; slime ;(setq inferior-lisp-program "/Users/smcho/bin/clojure") (add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/slime-20100404") (require 'slime-autoloads) (add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/slime-repl-20100404") (require 'slime-repl-autoloads) ;; swank-clojure (add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/swank-clojure-1.1.0") (require 'slime-repl-autoloads)
Now I could use Clojure on Emacs, I tried the same(or very similar) method to run Clojure on Aquamacs once more.
Step 1) Install ESK for Aquamacs
(setq kitfiles-dir (concat (file-name-directory (or (buffer-file-name) load-file-name)) "/aquamacs-emacs-starter-kit")) ; set up our various directories to load (add-to-list 'load-path kitfiles-dir) (require 'init)
Step2) * Follow the same step as before to install all the (same) packages, but "M-x slime" gives me the following error message. "Symbol's function definition is void: define-slime-contrib"
I tried to combine the packages from Emacs and Aquamacs, but they don't combine. I thought I could use the ELPA itself, not from the ESK to make it shared.
The result was not good, as ELPA couldn't download the swank-conjure package.
Please refer to this.
Aquamacs most definitely works with Clojure, since the author of Clojure uses it. However, I use Emacs, and after you perform the steps above in the Emacs section, I recommend checking out labrepl,
http://github.com/relevance/labrepl
If you don't have leiningen, the link to get and install it is in the instructions of the labrepl readme file. I found it extremely helpful when first learning how to set up an environment for Clojure programming. You can take apart the project.clj
file in labrepl and piece together how it works pretty easily. Not to mention the lessons and training in the built in web application that comes with labrepl.
If you want to use lein swank instead:
Make sure you have leiningen installed. In your project.clj dev dependencies you want to have an entry like this:
[leiningen/lein-swank "1.1.0"]
http://clojars.org/leiningen/lein-swank
Then after you've done lein deps
you should be able to run lein swank
and then from within Emacs run M-x slime-connect
and just press enter through the defaults.
If you're going to go this route, here is the link directly to leiningen so you can skip the labrepl repository: http://github.com/technomancy/leiningen