unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Mortimer Cladwell <mbcladwell@gmail.com>
To: matt.wette@gmail.com
Cc: guile-user@gnu.org
Subject: Re: backing out of debugger
Date: Wed, 15 Sep 2021 11:40:17 -0400	[thread overview]
Message-ID: <CAOcxjM6J54PkSsdTD6qWEr2g8XuUjOMp4mGFxQqB=dOeBm+esQ@mail.gmail.com> (raw)
In-Reply-To: <87ilz3fcn0.fsf@laura>

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 "<f4>") '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 <olivier.dion@polymtl.ca>
wrote:

> On Tue, 14 Sep 2021, Luis Felipe <luis.felipe.la@protonmail.com> wrote:
> > On Tuesday, September 14th, 2021 at 1:27 PM, Mortimer Cladwell <
> mbcladwell@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
>


  reply	other threads:[~2021-09-15 15:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 12:50 backing out of debugger Mortimer Cladwell
2021-09-14 13:11 ` Luis Felipe
2021-09-14 13:27   ` Mortimer Cladwell
2021-09-14 14:08     ` Luis Felipe
2021-09-14 14:35       ` Olivier Dion via General Guile related discussions
2021-09-15 15:40         ` Mortimer Cladwell [this message]
2021-09-14 13:55 ` tomas
2021-09-15 12:49 ` Matt Wette
2021-09-15 12:50   ` Matt Wette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOcxjM6J54PkSsdTD6qWEr2g8XuUjOMp4mGFxQqB=dOeBm+esQ@mail.gmail.com' \
    --to=mbcladwell@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=matt.wette@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).