Luke Gorrie luke@bluetail.com writes:
If CLIM used weak references, it would have the same trouble. I would guess they use normal references and normal GC, but I don't know.
In Emacs it seems we get into distributed garbage collection, though probably a simple case if only Emacs can refer to Lisp and not vice-versa.
what you could do is resort to double indirection. i.e. have the Lisp side assign indices to the printed objects it gives to Emacs, and have Emacs use those indices when the objects are clicked on. this way you can simply decide to keep only the last two thousand printed objects or something, no weak hash tables needed. and when Emacs asks for an object whose index is too old, Lisp can unambiguously detect this and react politely.
How about integrating SLIME with McCLIM instead? For example, it would be nice to type "Edit Definition foo" in the McCLIM listener, and have an Emacs window pop up with the definition.
just as long as you don't slide into writing an Emacs backend for McCLIM, I guess. :)
just kibitzing, --m