Question

Just trying to get a very basic install of slime and clojure working, but swank keeps failing when I run clojure-jack-in

I first got lein, then put the following in my .emacs (for version 24.1):

(add-to-list 'load-path "~/.emacs.d/packages/")
(require 'package) 
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) 
(package-initialize)

I then installed clojure-mode and paredit.

My ~/.lein/profiles.clj

{:user {:plugins [[lein-swank "1.4.4"]]
    :injections [(use '[clojure.repl :only [doc]])]}}

When I open up a clj file and run clojure-jack-in, swank gives me

slime-repl-79b38c83.el:122:1:Error: (slime-connection-output-buffer) is not a valid place expression
Was it helpful?

Solution

Do you have slime installed via marmalade or some other method? If yes then that's likely the problem. swank is incompatible with the CVS version of slime and installs it's own slime package. (note that you do need slime-repl from marmalade). Check your ~/.emacs.d/elpa dir and also the appropriate system-level package directory to be sure that you don't have an errant version lying around somewhere.

If you're confident that you have only one version of slime and that it's the correct version, you can try starting swank from a shell in the top-level directory of the project with

$ lein swank

and then connecting to that swank instance from emacs with M-x slime-connect, if that doesn't work you should at least get additional errors that shed light on your problem

OTHER TIPS

What version of lein are you using? I believe lein-swank 1.4.4 is meant to work with lein2. If you are using lein1, you will need lein-swank 1.4.2

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top