14

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?

Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284

1 Answers1

19

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.

Pinochle
  • 5,515
  • 2
  • 26
  • 20
  • if you are a truly a pinochle enthusiast, I would like to speak with you. Find me at www.powerpinochle.com/forum/ ...Dear moderators, please permit this comment long enough for Pinochle to read. – mickmackusa Feb 23 '16 at 04:12