Sly DB Eval-in-frame, but in a repl #494
AkashaP
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Link
https://gitlab.com/akashadutchie/sly-mrepl-db
About
This script allows you to evaluate expressions in the mrepl with frame context
It is similar to pressing E, but you get a full blown buffer with all of your MREPL customisations notably company completion to type commands in rather than a minibuffer.
I made this because I use the script floating around that closes minibuffer when not in focus. The minibuffer becomes too 'fragile' to do any serious thought with the risk of an accidental misclick or something closing the buffer, so I really dont like using it for anything other than one-liners.
I gave it a few days of testing while working on a project and I have had no complaints from it so far but I'm not fully accustomed to emacs/sly internals or emacs in general. I probably should look into how to use modes properly too. Regardless it seems to work just fine and I surprisingly havent really found a way to crash it or anything yet.
Usage
To use, when a debugger prompt is active, click on a frame and press Z.
here is some example code to try this with:
(step
(let ((some-local 12345))
(print "Let's use the debugger to find out what (gcd some-local 54321) is")
(setq dummy some-local)))
When executing this, move cursor to Frame 0: in the Backtrace: section and press Z, then at the bottom type (gcd some-local 54321)
it should drop you into a full blown REPL rather than the minibuffer as with E (sly-db-eval-in-frame).
here is an example, bottom left is the sly mrepl db instance, bottom right is the original repl that invoked the step form condition.
Beta Was this translation helpful? Give feedback.
All reactions