[slime-devel] Re: CMUCL 19a: NIL is not of type SWANK::CONNECTION

Chisheng Huang cph at chi-square-works.com
Sun Dec 5 20:46:39 UTC 2004


Helmut Eller <e9626484 at stud3.tuwien.ac.at> writes:

> Chisheng Huang <cph at chi-square-works.com> writes:
>
>> Slime retrieved by cvs update -D "2004-11-12" does not have this problem.
>> Slime retrieved by cvs update -D "2004-11-16" does.  Would somebody please
>> look into this?  Thanks a lot.
>
> The warning only means that you missed a few garbage collection
> messages.  With CMUCL, GC messages are now displayed in the echo area
> but apparently GC was triggered at a moment when the connection to
> Emacs wasn't quite ready.  I think this is not crucial and I'll fix it
> later.

The Simple-Warning conditions signaled under such circumstances are actually 
caught by a catch-all CONDITION clause in a HANDLER-CASE in my program and
causes troubles for me.  Typing simple code like the following

  (handler-case
      (dotimes (i 100000)
        (random 20000000))
    (condition ()
      (print :stop)))

in a slime repl buffer won't reproduce the problem.   The actual code that
caught those simple warning conditions is too complicated to reproduce here.

Anyway, I just use the following SEND-TO-EMACS to get around the problem:

  (defun send-to-emacs (object)
    "Send OBJECT to Emacs."
    (when *emacs-connection*
      (funcall (connection.send *emacs-connection*) object)))

If you think this fix is O.K., would you please merge it into swank.lisp?

Of course, it's entirely logical to ask why *EMACS-CONNECTION* is NIL in
the first place, which is totally beyond me.

Best wishes,

-cph






More information about the slime-devel mailing list