如何重新连接到slime / swank-clojure会话? [英] How to reconnect to slime/swank-clojure session?
问题描述
似乎每当我断开与clojure slime会话,我不能重新连接。我使用leiningen开始swank会话(使用lein-swank插件)。所以,每次我退出emacs(我知道我不应该)或重新启动/注销,我必须重新启动slime和swank。有没有办法重新连接到slime / clojure-swank会话?
It seems that whenever I disconnect from clojure slime session, I cannot reconnect again. I am using leiningen to start the swank session (with lein-swank plugin). So, every time I quit emacs (I know I shouldn't) or reboot/logout I have to restart both slime and swank. Is there a way to re-connect to a slime/clojure-swank session?
推荐答案
是的,但你必须告诉swank不关闭连接:
Yes, but you have to tell swank not to close the connection:
lein swank 4005 "localhost" :dont-close true
请注意,如果要传递:dont-close true >,则必须提供端口和主机名。 code> part;
4005
和localhost
是默认值。
Note that you have to supply the port and host name if you want to pass the :dont-close true
portion; 4005
and "localhost"
are the default values.
事实上,这使得可以同时将多个REPL连接到同一个 swank
实例中!然后,您可以在一个Emacs中输入(def foo:foo)
,并查看 foo
>:foo 。 : - )
In fact, this makes it possible to connect multiple REPLs to the same swank
instance at the same time! Then you can type in (def foo :foo)
in one Emacs and see foo
evaluate to :foo
in the other. :-)
这篇关于如何重新连接到slime / swank-clojure会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!