Luke Gorrie luke@bluetail.com writes:
Then on the Lisp side I suppose you need to arrange for a few variables to be bound for the debugger, e.g. *emacs-io* and *buffer-package*, which are usually only bound while serving evaluation requests.
Yes. I'm thinking about adding (araneida:use-slime-debugger) or something, which would be run from *slime-repl* where the appropriate streams are visible. It would save references to said streams and install a debugger hook
I'm guessing that Slime is not going to like it if multiple requests all cause errors and attempt to start the debugger in quick succession. Even if it does or can be made to, I'm unsure that I'd want to use it that way, so some form of locking in the debugger hook would probably be a good idea.
This will be good beyond Araneida. Now that we've taken over the REPL, it makes sense for us take over standard-IO, *debugger-hook*, etc, all the time Emacs is connected, not just during explicit requests. At least as an option.
Beyond a general lack of faith in the layers on layers of stuff that this involves (this might just be my own problem, I'm a software Luddite), I'm still not sure how this would work in the presence of foreign code, which doesn't have Lisp streams to print to, just file descriptors. i think output from that is still going to end up in *inferior-lisp*
-dan