SLIME is available in GNU/Linux distributions (see below) and from version control ( github link ). It works with GNU Emacs version 20+ and XEmacs 21, and with CMUCL 18e+, recent SBCLs, OpenMCL 0.14, and recent LispWorks. The fundamental features work with all Lisp backends, though for overall featurefulness CMUCL > SBCL > OpenMCL ~= LispWorks at present.
cvs -d :pserver:firstname.lastname@example.org:/project/slime/cvsroot login # Password is "anonymous" cvs -d :pserver:email@example.com:/project/slime/cvsroot checkout slime
The current CVS sources are usually reasonably stable. During times of heavy hacking, the tag
FAIRLY-STABLE is set to a reasonably up-to-date working copy. If you hit troubles, you may want to fall back to this version for a while.
To get the
FAIRLY-STABLE version, type:
cvs -d :pserver:firstname.lastname@example.org:/project/slime/cvsroot checkout -r FAIRLY-STABLE slime
Installing SLIME just means putting it into your Emacs
load-path and enabling it when you enter
lisp-mode. Once the Emacs code is loaded, the Common Lisp code is compiled and loaded automatically and on-demand.
Here is the Elisp code. You can paste this into your
~/.emacs after changing the path on the first line to suit your installation.
(add-to-list 'load-path "/the/path/to/slime") (require 'slime) (add-hook 'lisp-mode-hook (lambda () (slime-mode t))) (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t))) ;; Optionally, specify the lisp program you are using. Default is "lisp" (setq inferior-lisp-program "yourlisp")
The easiest way to start is
M-x slime. This starts a Lisp process in
*inferior-lisp* and has it compile and start the SLIME server ("Swank"). Emacs then automatically connects to Lisp with a TCP socket. If you give a prefix argument (
C-u M-x slime) then SLIME will prompt for the command to start Lisp (otherwise it uses
Alternatively, it is possible to start Lisp however you like and then later start the server manually. Load
swank-loader.lisp, which will automatically load the other files (and recompile them if necessary), and initialize Swank:
(load "/path/to/swank-loader.lisp") (swank-loader:init)Then you can start the server on (for example) port 4005 like this:
(swank:create-server :port 4005)
If you need the swank server to stay running then use this command instead:
(swank:create-server :port 4005 :style :spawn :dont-close t)
The server will listen for one connection from Emacs. To make that connection, use
Note: Although it is possible to connect to a Lisp on a remote machine, we haven't yet figured out what does and doesn't work without a shared filesystem.
Note: If you don't get *slime-repl* buffer and only *inferior-lisp* buffer after starting slime, probably you should check if localhost is set correctly. Also see here.
One you're up and running, you can start exploring the SLIME Features.
On Debian Linux you can install SLIME through
apt-get install slime. Note that you will still have to apt-get install an emacs of your choice to make it work. On Gentoo GNU/Linux you can install SLIME via the command
emerge slime-cvs. This will install a SLIME integrated nicely with the rest of the Emacs and Common Lisp infrastructure.
Other "Getting Started with SLIME" Guides
SLIME & OpenMCL & OS X by David Steuber.
SLIME & Allegro & Windows by Bill Clementson.
SLIME with 3 Windows CL Implementations by Bill Clementson.
SLIME with LispWorks Personal on Windows by Bill Clementson.
Reconnecting to a running Lisp with SLIME by Bill Clementson.
Reconnecting to a Lisp running in a remote FreeBSD jail with SLIME via ssh by Ng Pheng Siong.
Some undocumented SLIME features by Bill Clementson.
SLIME & SBCL & Windows Vista.
Installing CLISP, Emacs, and SLIME on Windows XP by Peter Christensen
Installing SBCL, Emacs, and SLIME on Windows XP by Peter Christensen
Using Slime over SSH by Any Sloane