what exactly does clojure-jack-in do? And how to config the settings with slime ? What do I need to add to .emacs?
clojure-jack-in
starts a SLIME session for your current project.
It does this by generating a random port number, running lein jack-in
with this port number in a sub-process, waiting for the swank server to start and then calling slime-connect
with the port number.
Since lein jack-in
is used to start the swank server, you obviously need to use Leiningen in your project and you need to have the swank-clojure plugin for Leiningen installed, either by installing it as a stand-alone plugin (lein plugin install swank-clojure 1.3.2
), or by including it as a dev-dependency in your project.clj
.
On the Emacs side, you need to install clojure-mode
, preferably from Marmalade. You shouldn't need to add anything to your .emacs
.
The difference between using lein jack-in
(via M-x clojure-jack-in
) vs. running lein swank
is that clojure-jack-in
also loads a version of SLIME that is bundled with the swank-clojure Leiningen plugin instead of the SLIME version installed in Emacs. I'm not sure what's the reasoning behind this, presumably just to make sure the SLIME version is compatible with the swank server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With