【发布时间】:2011-11-06 12:21:54
【问题描述】:
clojure-jack-in 到底是做什么的?以及如何使用 slime 配置设置? 我需要向 .emacs 添加什么内容?
【问题讨论】:
clojure-jack-in 到底是做什么的?以及如何使用 slime 配置设置? 我需要向 .emacs 添加什么内容?
【问题讨论】:
clojure-jack-in 为您当前的项目启动一个 SLIME 会话。
它通过生成一个随机端口号,在子进程中使用该端口号运行lein jack-in,等待swank 服务器启动,然后使用该端口号调用slime-connect。
由于lein jack-in 用于启动 swank 服务器,您显然需要在项目中使用 Leiningen,并且您需要安装 Leiningen 的 swank-clojure 插件,或者将其安装为独立插件(@ 987654326@),或将其作为开发依赖项包含在您的 project.clj 中。
在 Emacs 端,您需要安装 clojure-mode,最好从 Marmalade 安装。您不需要向您的 .emacs 添加任何内容。
使用lein jack-in(通过M-x clojure-jack-in)与运行lein swank之间的区别在于clojure-jack-in还加载了一个与swank-clojure Leiningen插件捆绑在一起的SLIME版本,而不是安装在Emacs。我不确定这背后的原因是什么,大概只是为了确保 SLIME 版本与 swank 服务器兼容。
【讨论】:
slime-note.message' got redefined Connecting to Swank on port 64608.. [2 times] Versions differ: 2011-08-26 (slime) vs. 20100404 (swank). Continue? (y or n) Connected. Let the hacking commence! Lisp connection closed unexpectedly: connection broken by remote peer if: Not connected. Use M-x slime' 来启动 Lisp。