Getting SLIME to work with Corman Lisp 2.51

What you'll need

What to do

1. Prepare a lisp image

To maximize startup speed, I recommend that you create a custom image for SLIME with most of the necessary code loaded. Here's the procedure:

  1. Start clconsole
  2. Load load-bits.lisp
  3. Save the image (using save-image) — I usually call it swank.img.

I don't recommend preloading the actual swank code, in order to easily pick up changes in that code. If that doesn't bother you, execute
(load "/path/to/swank-loader.lisp") before the save-image— but remember to patch SLIME first!

2. Patch SLIME

If your copy of SLIME includes a file named swank-corman.lisp (which it will if it is dated later than 2005-06-01), you may skip this step.

Grab swank-corman.lisp and swank-corman-patches.patch and put them in your SLIME directory.

Apply the patch (patch < swank-corman-patches.patch). If you do not have the patch utility, it is fairly easy to apply the patch manually. If you cannot or will not do this, contact me and I can provide pre-patched files.

3. Configure your .emacs

Follow the SLIME setup instructions.

Be aware that if your Corman Lisp installation directory includes spaces in any directory names (as the default does) you must use the old-style 8.3 names in inferior-lisp-program. It may be a good idea to install Corman Lisp in a directory without spaces instead.

4. Test

Type M-x slime in emacs. After a little while you should be greeted with the SLIME prompt. Note that compilation of swank sometimes randomly fails; if this happens to you, just M-x slime-abort-connection, M-x comint-kill-subjob and try again.

If you cannot get M-x slime to work, try the following:

  1. Start Corman Lisp with the image you created in step 1. (I do \path\to\corman\lisp\clconsole -image swank.img).
  2. Load swank ((load "/path/to/swank-loader.lisp")). If your image includes a preloaded swank you'll want to skip this step.
  3. Execute (swank:create-server). This should print ;; Swank started at port: 4005.
  4. You should now be able to do a M-x slime-connect RET RET in your emacs, and be greeted by SLIME.

If that didn't work either, you should have gotten some error messages. Send them either to me or to the SLIME mailing list, and we will try to help you.

What works?

Basic editing and evaluation
The REPL works, indentation is correct and C-M-x works.
Arglist display
Compilation
Loading files
Apropos and describe
Most debugger functionality
Inspector

What's missing

Interrupting
Some debugger functionality
  • Some frame-related stuff (restart and return-from most obviously)
  • Stepping
  • Tracing
  • Breakpoints
XREF
Profiling
More sophisticated communication styles
:spawn looks to be doable.