source: trunk/abcl/doc/slime.markdown

Last change on this file was 14712, checked in by Mark Evenson, 11 years ago

Note availability of Windows specific SLIME instructions.

File size: 3.9 KB
Line 
1SLIME
2=====
3
4    Author:   Mark Evenson
5    Created:  16-MAR-2010
6    Modified: 18-MAR-2010
7
8SLIME is divided conceptually in two parts: the "swank" server process
9which runs in the native Lisp and the "slime" client process running
10in Emacs Lisp.  These instructions were were written to accompany
11ABCL, but there is nothing ABCL specific in the instructions
12
13## Obtaining SLIME
14
15SLIME does not follow a release process in the standard sense with
16centrally versioned releases, so you are best off with obtaining the
17[latest version from CVS][1]. [Daily snapshots as gzipped tarballs are also available][2].
18Your local OS packaging system (i.e. MacPorts on OSX) may have a
19version as well.
20
21[1]: http://common-lisp.net/project/slime/#downloading
22[2]: http://common-lisp.net/project/slime/snapshots/slime-current.tgz
23
24## Starting SLIME
25
26One first locates the SLIME directory on the filesystem.  In the code
27that follows, the SLIME top level directory is assumed to be
28`"~/work/slime"`, so adjust this value to your local value as you see
29fit.
30
31Then one configures Emacs with the proper initialization hooks by
32adding code something like the following to "~/.emacs":
33
34    :::common-lisp
35    (add-to-list 'load-path "~/work/slime")
36    (setq slime-lisp-implementations
37      '((abcl ("~/work/abcl/abcl"))
38        (abcl.svn ("~/work/abcl.svn/abcl"))
39        (sbcl ("/opt/local/bin/sbcl"))))
40    (require 'slime)
41    (slime-setup '(slime-fancy slime-asdf slime-banner))
42
43One further need to customize the setting of
44`SLIME-LISP-IMPLEMENTATIONS` to the location(s) of the Lisp(s) you wish to
45invoke via SLIME.  The value is list of lists of the form
46
47   (SYMBOL ("/path/to/lisp"))
48
49where SYMBOL is a mnemonic for the Lisp implementation, and the string
50`"/path/to/lisp"` is the absolute path of the Lisp implementation that
51SLIME will associate with this symbol.  In the example above, I have
52defined three implementations, the main abcl implementation, a version
53that corresponds to the latest version from SVN invoked by
54`"~/work/abcl.svn/abcl"`, and a version of SBCL.
55
56To start SLIME one simply issues `M-x slime` from Emacs.  This will
57start the first entry in the SLIME-LISP-IMPLEMENTATIONS list.  If you
58wish to start a subsequent Lisp, prefix the Emacs invocation with a
59negative argument (i.e. `C-- M-x slime`).  This will present an
60interactive chooser over all symbols contained in
61`SLIME-LISP-IMPLEMENTATIONS`.
62
63After you invoke SLIME, you'll see a buffer open up named
64`*inferior-lisp*` where the Lisp image is started up, the required swank
65code is complied and then loaded, finally, you'll see the "flying
66letters" resolving itself to a `"CL-USER>"` prompt with an inspiration
67message in the minibuffer.  Your initiation to SLIME has begun...
68
69
70## Starting swank on its own
71
72In debugging, one may wish to start the swank server by itself without
73connection to Emacs.  The following code will both load and start the swank server
74from a Lisp image.  One merely needs to change *SLIME-DIRECTORY* to
75point to the top directory of the server process.
76
77    :::commmon-lisp
78    (defvar *slime-directory* #p"~/work/slime/") ;; Don't forget trailing slash
79    (load (merge-pathnames "swank-loader.lisp" *slime-directory*) :verbose t)
80    (swank-loader:init)
81    (swank:start-server "/tmp/swank.port") ;; remove if you don't want
82                                          ;; swank to start listening for connections.
83
84When this code finishes executing, an integer representing the port on
85which the server starts will be written to `'/tmp/swank.port'` and also
86returned as the result of evaluating `SWANK:START-SERVER`.  One may
87connect to this port via issuing `M-x slime-connect` in Emacs.
88
89## M$FT Windows
90
91See <http://slack.net/~evenson/abcl/slime-under-cygwin.html> for
92instructions specific to installing SLIME under Windows.
93
94### Historivia
95
96Luke Gorrie inherited a server implementation known as "Skank" which
97he rejected on the grounds of pure taste.
98
Note: See TracBrowser for help on using the repository browser.