views:

134

answers:

3

I've been using emacs/slime for coding lisp, but with Clojure I found 'lein swank'. I must say that it's pretty useful, as I can connect to a server that runs clojure.

How about the other Lisp implementations? What Lisp implementations provide the equivalent of 'lein swank' in Clojure? I mean, is there any other Lisp implementations that provide server connectivity so that I use 'M-x slime-connect', not just 'M-x slime'?

+1  A: 

You can load swank manually in CL and start the server (slime/swank were created for CL after all).

Brian
+4  A: 

Non-clojure swank backends don't need a lein swank equivalent since they can just launch a lisp instance and change its load-path at runtime to make it work for a given project. That approach doesn't work with Clojure since the JVM's classpath can't be modified at runtime.

technomancy
+1  A: 

I don't know about clisp, but this is what I have for SBCL. This co-exists with my clojure swank setup as well. I don't use ELPA and instead have a completely manual setup.

(add-to-list 'load-path "~/src/slime")
(require 'slime)
(add-to-list 'slime-lisp-implementations '(sbcl ("/usr/local/bin/sbcl")))
(setq slime-default-lisp 'sbcl)

I have a hand compiled SBCL. I see a swank backend for CLISP in the SLIME CVS codebase, so I guess, changing slime-default-lisp and slime-lisp-implementations to clisp probably will just work.

lein swank mainly exists for starting swank port on a particular project. This is needed because JVM classpaths cannot be modified at runtime. So, we start java with classpaths set to our project directories and dependencies using lein swank or swank-clojure-project. With CL, this is not necessary, as pathnames can be modified during runtime.

I have posted the complete config file at: http://github.com/vu3rdd/dotfiles

I will be glad to help setting up a fully manual emacs/slime/swank setup.

Ramakrishnan Muthukrishnan
@rkrishnan : I got the point, actually what I wanted to know was how to run swank remotely something like 'lein swank'. But, I guess it's just OK to run swank locally, not remotely. Thanks for the help.
prosseek