8

I've a problem. I've installed clojure, slime, slime-repl and elein using marmalade. Now I open my project and call elein-swank. I get this:

Starting swank..
error in process filter: slime-presentation-init-keymaps: Symbol's function definition is void: slime-define-both-key-bindings
error in process filter: Symbol's function definition is void: slime-define-both-key-bindings

and If I try clojure-jack-in I get

Debugger entered--Lisp error: (error "Could not start swank server: That's not a task. Use \"lein help\" to list all tasks.
signal(error ("Could not start swank server: That's not a task. Use \"lein help\" to list all tasks.\n"))
error("Could not start swank server: %s" "That's not a task. Use \"lein help\" to list all tasks.\n")
  clojure-jack-in-sentinel(#<process swank> "exited abnormally with code 1\n")

What can I do?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
user1050817
  • 915
  • 2
  • 11
  • 21

4 Answers4

6

I'm not sure what elein is, but I think for clojure-jack-in you need to install the swank-clojure plugin:

lein plugin install swank-clojure 1.3.3
harto
  • 89,823
  • 9
  • 47
  • 61
  • nop..it doesn't work neither...I install it but I receive the same message than before – user1050817 Nov 25 '11 at 05:12
  • Make sure you have the latest versions of swank-clojure and leiningen. Type "lein help" on the command line to see if you have a jack-in task. If not, you're missing the swank-clojure part... – ivant Nov 25 '11 at 06:47
  • Also call lein deps in the project dir before trying to jack-in. If you're missing some deps, lein will download them, but will output additional line(s) which may confuse clojure-jack-in parsing (it happened to me just yesterday). – ivant Nov 25 '11 at 06:50
  • 2
    FYI, the install command should be `lein plugin install swank-clojure 1.3.3`. – Gregg Williams Dec 10 '11 at 00:09
4

update: as of 2013, M-x nrepl-jack-in is preferred


The jack-in method is the preferred one, but you may also try the old favorite: run

$ lein swank

from the project's main dir, and then:

M-X slime-connect

from emacs. You still need swank-clojure:

$ lein plugin install swank-clojure 1.3.3
Dustin Getz
  • 21,282
  • 15
  • 82
  • 131
ivant
  • 3,909
  • 1
  • 25
  • 39
  • To be more precise - `clojure-jack-in` and the whole `swank-clojure` support was removed in `clojure-mode` 2.0.0. `nrepl.el` is now the only game in town. – Bozhidar Batsov Jan 26 '13 at 21:12
1

this happened to me when i cloned someone else's clojure project from an older version. their project.clj had:

:dev-dependencies [[lein-clojars "0.5.0"]
                   [swank-clojure "1.2.1"]]

which is incorrect, i think, if you're using M-x clojure-jack-in. removing these lines, running lein deps and jacking in worked for me.

Dustin Getz
  • 21,282
  • 15
  • 82
  • 131
0

If you're using lein 2, then try adding {:user {:plugins [[lein-swank "1.4.4"]] } } to ~/.lein/profiles.clj. see the Plugins section of https://github.com/technomancy/leiningen/wiki/Upgrading and https://github.com/technomancy/swank-clojure

Joffer
  • 1,921
  • 2
  • 21
  • 23