Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can I use two different lisp+slime/swanks from the same emacs?

can I use common lisp and Clojure from within emacs at the same time? I would like to have each lisp-REPL in its own buffer, and If i did this how could I controll which buffer sent its data to which lisp?

like image 557
Arthur Ulfeldt Avatar asked Aug 03 '09 16:08

Arthur Ulfeldt


1 Answers

Yes. In the documentation to Slime you will find slime-lisp-implementations. Here is how I have it defined in my .emacs:

(setq slime-lisp-implementations
   '((cmucl ("/usr/local/bin/lisp") :coding-system iso-8859-1-unix)
     (sbcl ("/usr/local/bin/sbcl" "--core" "/Users/pinochle/bin/sbcl.core-with-swank") :init (lambda (port-file _) (format "(swank:start-server %S :coding-system \"utf-8-unix\")\n" port-file)))
     (clozure ("/Users/pinochle/bin/ccl"))
     (clojure ("/Users/pinochle/bin/clojure") :init swank-clojure-init)))

You start up your lisps using M-- M-x Slime. It will ask you which Lisp to start up, and you use the name you defined in slime-lisp-implementations. In this example, I would use cmucl, sbcl, clozure or clojure.

You can switch the "active" REPL using the command C-c C-x c. For more info, see the Slime Documentation on controlling multiple connections.

like image 185
Pinochle Avatar answered Sep 27 '22 16:09

Pinochle