Yeah, yesterday I decided I wanted to do something with Lisp again, and I figured that Clojure was the hot new kid on the block, so I should use that, and now it's tonight and I still don't have SLIME hooked up to Clojure, presumably because there's no actual guide to anything, and any howto that anybody made is guaranteed to be out of date almost before they post it.
Clojure is really appealing otherwise, though, as lisps go.
Edit (2x): I had a statement here of my particular problem at the moment, but then it changed, so I deleted it.
You're going about it differently than I did (haven't gotten around to leiningen yet), but I found the top google results for linking emacs to clojure were woefully out of date. I'm a newbie to both emacs and clojure, so I couldn't figure out what I needed to do to correct for the old info.
I gave up on that route and installed elpa on emacs, which I then used to install slime, swank, and clojure. Works great!
I had a similar problem, and by far the easiest thing for me has been:
1) Add lein-swank to the dev-dependencies of the project I'm working on (i.e., add this - :dev-dependencies [[leiningen/lein-swank "1.1.0"]] - to your project.clj file
2) lein deps
3) lein swank
4) M-x slime-connect in emacs, then accept the default host/port
I'm about to try that (in the middle of trying another thing at the moment), and this isn't to you in particular, but as a general complaint, why do I have to have a project.clj file to get a nice repl in emacs?
Heh. If you have a procedure that's that simple, please blog about it.
Here's what I had to do:
- Download the lein script and put it in my PATH
- Download package.el and put it in my .emacs load-path
- lein self-install
- make a project directory, and 'lein new projname .' inside
it
- modify the resulting project.clj to add
:dev-dependencies [[leiningen/lein-swank "1.1.0"]
[swank-clojure "1.2.1"]]
- lein deps in said directory
- Install package.el, and then install slime, clojure-mode, slime-repl, and swank-clojure with it (and fight with it and get confused about why it didn't know about slime-repl until I installed it several times but then noticed it when I restarted Aquamacs)
This is what I did too. It works, and is simple and easy. The downside is that it sort of "takes over" SLIME and prevents you from easily using other Lisps with it. As a frequent SBCL user, I found this annoying. I ended up putting a switch in my .emacs which I can turn on and off depending on whether I want my SLIME to use Clojure, or some other Lisp. Suboptimal, and someone really needs to fix this Clojure-SLIME integration problem, but it serves my needs.