Common Lisp, Development, LISP

SLIME for Emacs Live

Emacs Live is a frakkin’ epic compilation of customizations and packages, streamlined for the ultimate hacking experience. As I mentioned in my last post, Adventures in Clojure, it’s under development by the same team as the Clojure bridge to SuperCollider, Overtone. The one downside? It was designed for hacking Clojure, so it doesn’t include SLIME and Common Lisp support out of the box, and of course, it completely replaces your ~/.emacs.d/ directory and ~/.emacs config file, so you lose your existing SLIME setup (and all your other customizations) when you install Emacs Live. Don’t panic, the Emacs Live installer is smart enough to move your existing ~/.emacs.d/ folder and ~/.emacs config file to a safe place.

Emacs Live does, however, offer a pretty neat interface for creating Live Packs, boxed collections of Emacs packages and customizations, that can all be loaded together as a single package via ~/.emacs-live.el, stored outside the managed ~/emacs.d/ directory so that they can be maintained across updates. This made it only slightly less trivial than normal to get SLIME set up and running in Emacs Live.

To get the full Emacs Live experience for Common Lisp, however, you also need another package, AC-SLIME. It provides the auto-completion and pop-up documentation for Common Lisp, both in file buffers and the REPL.

I have packaged both together in an Emacs Live pack, which you can get at: Installation is a cinch. After installing Emacs Live, just clone SLIME-PACK into your ~/.live-packs/ directory, and add the following line to your ~/.emacs-live.el config file:

(live-append-packs '(~/.live-packs/slime-pack))

The default inferior-lisp-program for SLIME-PACK is SBCL. You can change this, as normal, by setq‘ing inferior-lisp-program to your chosen Lisp implementation after the code above.

Once that’s all done and saved, either restart Emacs or compile and load your modified config file. You can then simply M-x slime as normal, and enjoy all the extra Emacs Live awesomeness for Common Lisp!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s