Next: , Previous: , Up: Tips and Tricks   [Contents][Index]


7.2 Globally redirecting all IO to the REPL

When connecting via M-x slime-connect SLIME does not change *standard-output* and friends outside of the REPL. If you have any other threads which call format, write-string, etc. that output will be seen only in the *inferior-lisp* buffer or on the terminal, more often than not this is inconvenient. So, if you want code such as this:

(run-in-new-thread
  (lambda ()
    (write-line "In some random thread.~%" *standard-output*)))

to send its output to SLIME’s repl buffer, as opposed to *inferior-lisp*, set swank:*globally-redirect-io* to T in ~/.swank.lisp

But when started using M-x slime the streams are redirected by default.