The most important configurable is SWANK:*COMMUNICATION-STYLE*
,
which specifies the mechanism by which Lisp reads and processes
protocol messages from Emacs. The choice of communication style has a
global influence on SLIME's operation.
The available communication styles are:
NIL
:FD-HANDLER
select()
-loop.”
Swank registers the communication socket with an event-dispatching
framework (such as SERVE-EVENT
in CMUCL and
SBCL) and receives a callback when data is available. In
this style requests from Emacs are only detected and processed when
Lisp enters the event-loop. This style is simple and predictable.
:SIGIO
SIGIO
signal
handler. Lisp receives requests from Emacs along with a signal,
causing it to interrupt whatever it is doing to serve the
request. This style has the advantage of responsiveness, since Emacs
can perform operations in Lisp even while it is busy doing other
things. It also allows Emacs to issue requests concurrently, e.g. to
send one long-running request (like compilation) and then interrupt
that with several short requests before it completes. The
disadvantages are that it may conflict with other uses of SIGIO
by Lisp code, and it may cause untold havoc by interrupting Lisp at an
awkward moment.
:SPAWN
:SIGIO
, but it does not use signals and all requests issued
by Emacs can be executed in parallel.
The default request handling style is chosen according to the
capabilities of your Lisp system. The general order of preference is
:SPAWN
, then :SIGIO
, then :FD-HANDLER
, with
NIL
as a last resort. You can check the default style by
calling SWANK-BACKEND::PREFERRED-COMMUNICATION-STYLE
. You can
also override the default by setting
SWANK:*COMMUNICATION-STYLE*
in your Swank init file.