How to reconnect to slime/swank-clojure session?

╄→尐↘猪︶ㄣ 提交于 2019-12-23 12:48:13

问题


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?


回答1:


Yes, but you have to tell swank not to close the connection:

lein swank 4005 "localhost" :dont-close true

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.

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. :-)



来源:https://stackoverflow.com/questions/2752720/how-to-reconnect-to-slime-swank-clojure-session

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!