Hi,
I was wondering if it is possible, using SBCL and SLIME, to have the output (errors, warnings, et c.) from slime-compile-and-load-file directed somewhere other than the REPL?
The *compilation notes* buffer seems to contain all the information I need, and it's sort of a pain to have those several screenfuls of output dumped to the REPL. I looked around for something like "slime- compile-file-hook", but if it's there I missed it.
Many thanks, Matt
Matt Pillsbury pillsbury@gmail.com writes:
I was wondering if it is possible, using SBCL and SLIME, to have the output (errors, warnings, et c.) from slime-compile-and-load-file directed somewhere other than the REPL?
Did you ever find a solution to this? I'm also looking for a way to keep my repl clean.
Cheers, Chris Dean
Chris Dean ctdean@sokitomi.com writes:
Matt Pillsbury pillsbury@gmail.com writes:
I was wondering if it is possible, using SBCL and SLIME, to have the output (errors, warnings, et c.) from slime-compile-and-load-file directed somewhere other than the REPL?
Did you ever find a solution to this? I'm also looking for a way to keep my repl clean.
Slime doesn't currently have the infrastructure for this really, not that adding it would be too difficult.
Compiler-output controlled by *compile-print* and *compile-verbose* should go to *standard-output*, which I believe you don't have a problem with.
Everything else _should_ go to *error-output*, and in SBCL at least I believe it does, so you need to bind *error-output* at the right place to another stream.
(defun swank-compiler (function) (clear-compiler-notes) (with-simple-restart (abort "Abort SLIME compilation.") (multiple-value-bind (result usecs) (handler-bind ((compiler-condition #'record-note-for-condition)) (let ((*error-output* your-compiler-error-output-stream)) ; <--- HERE (measure-time-interval function))) (list (to-string result) (format nil "~,2F" (/ usecs 1000000.0))))))
If you just want to get rid of the "noise", bind it to the result of (make-broadcast-stream).
The more complete solution is to add another stream to the comm layer, and have it write to *slime-compile-output* or something.
Cheers,
-- Nikodemus Schemer: "Buddha is small, clean, and serious." Lispnik: "Buddha is big, has hairy armpits, and laughs."