lawrence mitchell wence@gmx.li writes:
I thought one might be able to, on the swank side, specialise PRINT-OBJECT, or PRINT-UNREADABLE-OBJECT to add some extra information, perhaps something of the form:
"(:ok (:unreadable "#<FUNCTION FOO>" :type 'function :name 'foo))"
Just as an idea: you could use Emacs's syntax for strings with text-properties (which is similar to CL's syntax for arrays :-). The example would then look like
#("#<FUNCTION FOO>" 0 15 (:type function :name foo))
But I note that we use :ok messages only for the result of the evaluation and not for the redirected output to streams. For the redirected output we use either a gray stream that sends :read-output events or a dedicated socket connection with a simple process filter on the Emacs side. This can be configured with swank::*use-dedicated-output-stream*. A specialized gray stream with some extra events is probably what you need. But the dedicated socket connection is faster and Emacs remains responsive if there is a lot of output.
Helmut.