SBCL + Emacs + Windows Vista

Here are my steps for setting up SBCL (Steel Bank Common Lisp) and Slime (Emacs Lisp mode) to work under Windows Vista.

It’s mostly straightforward, except for dealing with spaces in path names. It turns out that slime.el uses the (split-string) function to pull apart the Lisp command line, which won’t work with the default “c:\program files\…” location. Here’s how to fix that, using symbolic links (yes, Windows supports them too!).

The following was tested on a Vista box, SBCL 1.0.13, and Slime 2.0 on Emacs 22.2.1.

Installing SBCL:

  1. Download and install SBCL. By default, it will install to c:\Program Files\Steel Bank Common Lisp\1.0.13
  2. Run cmd.exe as Administrator (required for symbolic links)
  3. Set up a link from SBCL install directory, to some location without spaces. Note that the syntax is an inverse of the Unix ‘ln’ command.

    C:\Users\Rob\Documents>ver
    Microsoft Windows [Version 6.0.6000]

    C:\Users\Rob\Documents>mklink /d SBCL “c:\Program Files\Steel Bank Common Lisp\1.0.13″
    symbolic link created for SBCL <<===>> c:\Program Files\Steel Bank Common Lisp\1.0.13

    C:\Users\Rob\Documents>dir sbcl*

    04/09/2008 09:07 PM <SYMLINKD> SBCL [c:\Program Files\Steel Bank Common Lisp\1.0.13]

Installing Emacs and Slime:

  1. Download Emacs, unzip it to any location (eg. c:\Program Files\emacs). If desired, run the emacs\bin\addpm.exe program to add a link to the start menu.
  2. Download Slime, and unzip it under your emacs/site-lisp directory.
  3. Add the following to your ~/.emacs file:
    (setq inferior-lisp-program “c:/users/rob/documents/sbcl/sbcl.exe –core c:/users/rob/documents/sbcl/sbcl.core”)
    (require ’slime)
    (slime-setup) 
  4. Restart Emacs, and then run M-x run-lisp to test whether Lisp starts up.
  5. Start slime with M-x slime. Happy hacking!