Dr. Arne Babenhauserheide writes: Hi Arne,
> Jannneke Nieuwenhuizen <jann...@gnu.org> writes: >> In 2014, I wrote patches for Guile to use a debug prompt that GUD can >> work with. The Guile debug patches didn't make it into Guile, but the >> Emacs GUD integration is part of Emacs. >> >> https://lists.gnu.org/archive/html/guile-devel/2014-08/msg00004.html > > What were the reasons these didn’t make it? No idea, there was no comment or interest in the patch. I believe the consensus was (is?) to use pk for debugging. FWIW, I'm using my own "pke", because many of my programs are (pseudo-)filters, writing their output to stdout, which makes "pk" not so handy. See attached. > I now have push-access, so if these get acked by someone who knows that > part well enough, I can take up the integration. That's nice, but it probably needs to be updated and it certainly needs some discussion. Greetings, Janneke
>From 98264afe030eef3b5bbabc03b76808253ce10d14 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> Date: Fri, 3 Mar 2023 11:26:34 +0100 Subject: [PATCH] Add peek-error, pke. Debuging using `pk' is popular in Guile, but not really usable if your program is as (pseudo-)filter, i.e., writing its output to stdout. * module/ice-9/boot-9.scm (peek-error, pke): New procedures. --- module/ice-9/boot-9.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index dc3537063..639aaaa79 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -183,6 +183,16 @@ This is handy for tracing function calls, e.g.: (define pk peek) +(define (peek-error . stuff) + "Like peek (peok), writing to (CURRENT-ERROR-PORT)." + (newline (current-error-port)) + (display ";;; " (current-error-port)) + (write stuff (current-error-port)) + (newline (current-error-port)) + (car (last-pair stuff))) + +(define pke peek-error) + (define (warn . stuff) (newline (current-warning-port)) (display ";;; WARNING " (current-warning-port)) -- 2.39.1
-- Janneke Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com