Hi,
When I run SBCL under slime with *GLOBALLY-REDIRECT-IO* true and *COMMUNICATION-STYLE* :FD-HANDLER or :SIGIO, I get a repl buffer with name "*slime-repl nil*", and any subsequent SBCLs created by slime steal this buffer. The problem is that with *GLOBALLY-REDIRECT-IO*, the initial "Adding ... handler" messages get to Emacs before the reply to (swank:connection-info), and so the event processing on the slime side creates the repl buffer before the slime connection has been initialized. Getting rid of those messages seems to fix things.
Thanks, RmK
--- swank-sbcl.lisp 17 Jul 2008 22:19:11 -0000 1.199 +++ swank-sbcl.lisp 22 Jul 2008 22:22:39 -0000 @@ -133,7 +133,6 @@ (defimplementation add-sigio-handler (socket fn) (set-sigio-handler) (let ((fd (socket-fd socket))) - (format *debug-io* "Adding sigio handler: ~S ~%" fd) (enable-sigio-on-fd fd) (push (cons fd fn) *sigio-handlers*)))
@@ -146,7 +145,6 @@ (defimplementation add-fd-handler (socket fn) (declare (type function fn)) (let ((fd (socket-fd socket))) - (format *debug-io* "; Adding fd handler: ~S ~%" fd) (sb-sys:add-fd-handler fd :input (lambda (_) _ (funcall fn)))))
* Richard M Kreuter [2008-07-23 00:26+0200] writes:
Hi,
When I run SBCL under slime with *GLOBALLY-REDIRECT-IO* true and *COMMUNICATION-STYLE* :FD-HANDLER or :SIGIO, I get a repl buffer with name "*slime-repl nil*", and any subsequent SBCLs created by slime steal this buffer. The problem is that with *GLOBALLY-REDIRECT-IO*, the initial "Adding ... handler" messages get to Emacs before the reply to (swank:connection-info), and so the event processing on the slime side creates the repl buffer before the slime connection has been initialized. Getting rid of those messages seems to fix things.
Patch applied.
A more complete fix would probably be to set up IO redirection only after the Emacs side is completely initialized, i.e. after the swank:connection-info RPC.
Helmut.