[slime-devel] connection.repl-results

Matthias Koeppe mkoeppe+slime at mail.math.uni-magdeburg.de
Sat Jul 11 18:46:09 UTC 2009


On Mon, Jul 6, 2009 at 3:27 AM, Tobias C. Rittweiler<tcr at freebits.de> wrote:
>
> What's the purpose of CONNECTION.REPL-RESULTS?
>
> Or asked differently:
>
> Shouldn't SEND-REPL-RESULTS-TO-EMACS use it?

This stream sends strings to the REPL buffer, where it will appear as
a REPL result, using (:write-string MESSAGE :repl-result)

In normal SLIME, there is no *big* difference to sending these
:write-string messages directly, which is what
SEND-REPL-RESULTS-TO-EMACS does, but see below.

When swank-presentation-streams is loaded, however, we use the stream
to support nested presentations in the REPL result, such as those that
you get when you type

         (list (find-class 'standard-class) (find-class 'standard-object))

I remark that there would also be a benefit in using the stream in
normal SLIME without presentation streams: Large REPL results, like
from

        (make-list 2000000)

will be sent through the stream, so it will be sent using many small
:write-string messages rather than one huge message, so we can see the
beginning of the output in Emacs before Lisp finishes printing all of
it.

Unfortunately it seems there is currently a bug in SLIME that keeps
repositioning point to the end of the buffer while this output
appears, so it is not possible to scroll up during this time...

Matthias
-- 
Matthias Koeppe -- http://www.math.ucdavis.edu/~mkoeppe




More information about the slime-devel mailing list