Using LispWorks Personal with Emacs/SLIME on Windows
Monday, March 15, 2004
earlier post, I outlined how to configure Emacs to use
SLIME with either
CLISP on Windows. However, my configuration instructions for LispWorks assumed
the commercial versions of the product, not the free Personal
version. As I mentioned in the posting: "the LispWorks Personal
version doesn't have support for init files. Therefore, it is
necessary to manually enter (load "c:/usr/home/.slime.lisp") into
LispWorks after it has started". This is inconvenient for people who
are trying out LispWorks and want to use Emacs and SLIME. To get around this
problem, I've created a basic
WSH script that feeds the necessary key
strokes to LispWorks to get it to load the ".slime.lisp" startup
file. This is a bit of a
kludge; however, I couldn't think of a more elegant way to get
around the limitations in the LispWorks Personal edition on Windows.
Here are the steps you would need to follow to replicate what I've done:
- Follow the steps I outlined in my earlier post to make the required changes to the .emacs file and to create the ".slime.lisp" startup file.
- Add the following to your .emacs file for LispWorks Personal (you may need to change the directory location for ".lw-slime.vbs"):
- If you are using Windows2000 or Windows XP, you will already have the Windows Scripting Host (WSH) on your machine. If you are using a different Windows OS (or don't have WSH on your PC for some reason), you can download WSH from here.
- Create a file called ".lw-slime.vbs" (put it in "c:/usr/home/" or whatever directory you specified in step 2 above) with the following contents (you may need to change the dirctory locations and the "WScript.Sleep" values in this script):
(defun lwp-start () (interactive) (shell-command "c:/usr/home/.lw-slime.vbs&"))
Set Wsh = Wscript.CreateObject("Wscript.Shell")
rem Start up LispWorks
rem Wait for a few seconds for it to start
rem Press the OK button on the splash screen
Wsh.AppActivate "Upgrade LispWorks"
rem Load the SLIME startup code
Wsh.AppActivate "LispWorks Personal Edition 4.3.6"
str = "load " & """c:/usr/home/.slime.lisp"""
rem Toggle back to Emacs
- Start LispWorks first with "M-x lwp-start" from Emacs
- Start the SLIME connection with "M-x slime-connect RET RET RET" from Emacs