1
votes

I'm a clojure noob trying to get emacs & slime set up. There doesn't seem to be one true way to do this, so I've followed a few blog posts and the swank-clojure and leiningen READMEs.

Mostly it works. My problem is that if I try to select restart 0 [QUIT] from a backtrace, I get

'error in process filter: Wrong number of arguments: nil, 0'

(I also see a warning on 'M-x slime-connect' about slime and swank being mismatched versions, but Googling suggests this is expected).

This is Debian Lenny. I got slime via 'git clone git://git.boinkor.net/slime.git'. Clojure and clojure-contrib are 1.2.0, and swank-clojure is 1.2.1.

Anyone seen this? Alternatively, is there an up-to-date list of compatible versions of all the pieces? Many thanks.

Edit:

Looks like it is probably this issue. I followed the same blog post as the OP in that thread.

Edit:

Yes. Getting slime and slime-repl packages using ELPA fixed it.

3

3 Answers

0
votes

Here's an update for google: things have changed since the previous answers and the correct way to start swank/slime is now via the clojure-jack-in command in recent versions of clojure-mode, which uses the corresponding lein jack-in command in recent versions of swank-clojure. Using clojure-jack-in, all the Emacs dependencies other than clojure-mode are automatically installed for you. DO NOT install slime.el or slime-repl.el manually, via ELPA or via git.

2
votes

Don't get slime via git, but use ELPA. See the links in my edits to the question.

1
votes

the clojure ecosystem has changed a lot over this last year so many of the most linked tutorials sort of do things the hard way. you dont really need to build clojure/contrib and install it anymore. both Maven2 and leinengen do this ver well for you.

you may be able to get up and clojureing just by installing lein (from the tutorial) and then making a new project. this is enough to keep me happy even on my larger projects. you dont really need to install clojure system wide.

from a (ubuntu-10.10) system that has never seen clojure before i run:

dev:~$ lein new foo
Created new project in: foo
dev:~$ cd foo
dev:~/foo$ ls
    project.clj  README  src  test
dev:~/foo$ lein repl
Downloading: org/clojure/clojure/1.2.0/clojure-1.2.0.pom from central
Downloading: org/clojure/clojure-contrib/1.2.0/clojure-contrib-1.2.0.pom from central
Downloading: org/clojure/clojure-contrib/1.2.0/clojure-contrib-1.2.0.pom from clojure
Transferring 4K from clojure
Downloading: org/clojure/clojure/1.2.0/clojure-1.2.0.jar from central
Downloading: org/clojure/clojure-contrib/1.2.0/clojure-contrib-1.2.0.jar from central
Downloading: org/clojure/clojure-contrib/1.2.0/clojure-contrib-1.2.0.jar from clojure
Transferring 466K from clojure
Copying 2 files to /home/arthur/foo/lib
"REPL started; server listening on localhost:20092."
user=> (+ 1 2 3)

and thats all you really need. have fun :) (of course there is a LOT more to the clojure ecosystem though there is no need to really rush into it)

ps: add swank-clojure as a dev dependency and run lein swank and then slime-connect from within emacs

ps: I hit 'q' to exit the backtraces.