[slime-devel] [CLSQL] Slime, CLSQL, and reader macros

Helmut Eller heller at common-lisp.net
Fri Apr 2 18:20:55 UTC 2010


* Patrick May [2010-04-02 19:20+0200] writes:

>
> 	My goal is to have my development and testing in Slime reflect
> 	exactly what will happen when I run the same code in the same
> 	file from the command line.  I see three possible ways of
> 	achieving this:
>
> 1)  Configure Clozure to behave more like SBCL, if possible.
> 2)  Use swank:*default-worker-thread-bindings* externally to the file somehow.
> 3)  Set swank:*communication-style* to :fd-handler.

:fd-handler doesn't work with CCL.  You could set
swank:*communication-style* to nil, which works with every backend, but
of course loses some niceties, eg. you can't use M-. while Lisp does a
lengthy computation.

> Are there other solutions?  

You could use swank:*readtable-alist* tell Slime that a certain
readtable should be used for certain packages.

If you have a EVAL-WHEN form to switch readtables at the beginning of
the file, you could simply use C-c C-k and compile the file as one unit.
Of course, that's not a real fix but good enough in many cases.

> What is my best option?  

Well, the easiest would be not to mess around with custom read syntax
and follow the old advice: "don't fight your tools".

> What are the drawbacks to using :fd-handler?

Only works with CMUCL/SBCL (but not on Windows) and some other rather
technical problems that you probably don't want to know.

Helmut





More information about the slime-devel mailing list