为什么 clojure 以“Mx slime”开头?我的 Aquamacs 无需任何设置?
我的 Mac 上运行着 Aquamacs。
我安装了 ESK for Aquamacs 并将 ELPA 安装在 ~/.emacs 中。 d/elpa。使用 ELPA,我安装了 clojure-mode/clojure-est-mode/slime/slime-repl/swank-clojure。
问题是,当我运行“Mx slime”时,clojure 就会运行。这是为什么呢?我很好奇,因为我的 .emacs 甚至 /Users/smcho/Library/Preferences/Aquamacs Emacs/{Preferences.el,customizations.el} 中都没有任何史莱姆设置。我的意思是,我没有 (setq lower-lisp-program "clojure") 之类的东西。
或者,这与我的“swank-clojure”安装有关吗?我在 inferior-lisp 缓冲区看到类似的东西。
(require 'swank.swank) (swank.swank/ignore-protocol-version nil) ... #ServerSocket ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=51847]
I have Aquamacs running on my Mac.
I installed the ESK for Aquamacs and it installs ELPA at ~/.emacs.d/elpa. With ELPA, I installed clojure-mode/clojure-est-mode/slime/slime-repl/swank-clojure.
The thing is that when I run 'M-x slime', clojure is run. Why is this? I'm curious as I don't have any setup for slime in my .emacs and even in /Users/smcho/Library/Preferences/Aquamacs Emacs/{Preferences.el, customizations.el}. I mean, I don't have (setq inferior-lisp-program "clojure") or something.
Or, does it have to do with my 'swank-clojure' installation? I see something like this at the inferior-lisp buffer.
(require 'swank.swank) (swank.swank/ignore-protocol-version nil) ... #ServerSocket ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=51847]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是因为
swank-clojure.el
,一个已弃用的 elisp 程序。不要使用它,按照我的That's because of
swank-clojure.el
, a deprecated elisp program. Don't use it, as per my post here, on your next question. It may have bugs and thus isn't suitable to use. UseM-x slime-connect
instead, after starting swank up withlein swank
.正如 Isaac 所说,swank-clojure.el 为 clojure 设置了“slime-lisp-implementations”(简而言之,一种在类路径中使用 swank-clojure 启动 java 的方法,以便可以启动 swank)。然后 slime 连接到这个端口,你就得到了 repl。
这种方法的问题在于,您需要预先设置类路径。对于您想要从事的每个项目来说,这都会变得乏味。因此,最好的方法是使用 Mx swank-clojure-project 或 lein swank,然后使用 Mx slime-connect。我更喜欢 swank-clojure-project。
As Isaac said, swank-clojure.el sets 'slime-lisp-implementations' for clojure (in short, a way to start java with swank-clojure in classpath so that swank can be started). Then slime connects to this port and you get the repl.
The problem with this approach is that, you will need to setup classpath upfront. This gets tedious for each and every project you want to work on. So, best way is to use M-x swank-clojure-project or lein swank and then M-x slime-connect. I prefer swank-clojure-project.