简体   繁体   English

Emacs与Slime和Swank一起为非leiningen项目

[英]Emacs with Slime and Swank for non-leiningen projects

I found this website which explains how to use emacs with leiningen, swank, and slime. 我发现这个网站解释了如何使用emain与leiningen,swank和slime。 Is there a way to use slime + swank in non-leiningen projects ie how can I connect to slime/swank repl to run a ad-hoc Clojure script while I write it as demonstrated here ? 有没有办法在非leiningen项目中使用slime + swank,即我如何连接到slime / swank repl以运行ad-hoc Clojure脚本,而我在此处演示它?

You need to have swank-clojure.jar in CLASSPATH and your script should have following code: 你需要在CLASSPATH使用swank-clojure.jar ,你的脚本应该有以下代码:

(require 'swank.swank) 
(swank.swank/start-repl 4005)

to start swank process on port 4005 (or some other)... 在端口4005 (或其他一些)上启动swank进程...

PS You can look onto Incanter's swank script, that pass this code in environment variable, and later it evaluated as part of boostrap script PS你可以欣赏到咒术自吹脚本,即通过在环境变量的代码,后来人们评价为一部分的自举脚本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM