Re: backing out of debugger

2021-09-15 Thread Matt Wette



On 9/14/21 5:50 AM, Mortimer Cladwell wrote:

Hi,
Let's say I made a lot of mistakes. I look at my repl and see:
scheme@(guile-user) [10]>

Any way to back out to scheme@(guile-user)> without typing ,q ten times?
Thanks
Mortimer

Try binding a command to:

(while (pair? (cdr (fluid-ref *repl-stack*))) (throw 'quit))




Re: backing out of debugger

2021-09-15 Thread Matt Wette




On 9/15/21 5:49 AM, Matt Wette wrote:


On 9/14/21 5:50 AM, Mortimer Cladwell wrote:

Hi,
Let's say I made a lot of mistakes. I look at my repl and see:
scheme@(guile-user) [10]>

Any way to back out to scheme@(guile-user)> without typing ,q ten times?
Thanks
Mortimer

Try binding a command to:

(while (pair? (cdr (fluid-ref *repl-stack*))) (throw 'quit))



ThisĀ  probably won't work but it could be a start.




Re: backing out of debugger

2021-09-15 Thread Mortimer Cladwell
Thanks Matt.
I wrote a Guile utility function and attached to a button using e-lisp:

Guile---
(define (back-out repl-stack )
  (if (null? (cdr repl-stack))
  (throw 'quit)
  (begin
(throw 'quit)
(back-out (cdr repl-stack)
end guile---

Emacs Lisp---
(defun insert-back-out()
  (interactive)
  (insert "(back-out (fluid-ref *repl-stack*))"))

(global-set-key (kbd "") 'insert-back-out)
---end-elisp--

If I am at scheme@(guile-user) [3]> I must press the button three times.
So doesn't quite work as expected. Seems like only one (throw 'quit) can be
executed per prompt? Not sure what the problem is.
Mortimer

On Tue, Sep 14, 2021 at 10:35 AM Olivier Dion 
wrote:

> On Tue, 14 Sep 2021, Luis Felipe  wrote:
> > On Tuesday, September 14th, 2021 at 1:27 PM, Mortimer Cladwell <
> mbcladw...@gmail.com> wrote:
> >
> >> Thanks Luis. What about in emacs/geiser where Ctrl-D won't work?
> >
> > The equivalent in Geiser would be C-c C-q, I think. But I don't know
> > if that's any better than typing ,q plus Enter :)
>
> You could define a procedure that calls geiser-repl-exit N time with the
> prefix argument.
>
> Note that geiser-repl-exit already takes a prefix argument, but will
> simply kill the process instead of exiting N repl.
>
> --
> Olivier Dion
> Polymtl
>