开发者

what exactly does clojure-jack-in do? And how to config the settings with slime?

开发者 https://www.devze.com 2023-03-31 11:26 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号