guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUILE_QUIET=1 guile → suppress REPL welcome message (fixed message f


From: Dr. Arne Babenhauserheide
Subject: Re: GUILE_QUIET=1 guile → suppress REPL welcome message (fixed message format)
Date: Wed, 02 Oct 2024 15:48:58 +0200

Matt Wette <matt.wette@gmail.com> writes:

> On 3/11/24 6:50 AM, Matt Wette wrote:
>> On 3/10/24 6:01 PM, Dr. Arne Babenhauserheide wrote:
>>> Hi,
>>>
>>> It’s been two months now, did anyone get to review this patch?
>>>
>>> It’s small and it gives an instant improvement when using Guile in Emacs
>>> orgmode babel sourceblocks that get evaluated on export.
>>>
>>> Best wishes,
>>> Arne
>>>
>> I did look at it.  Another solution, I prefer, is generate a global
>> urrent-info-port object and
>> provide a command-line option to make that a file or /dev/null. Send
>> the welcome and
>> auto-compile messages to (current-info-port).
>>
>> I had a patch for this at one time, but can't find it right now.
>
> I found it.  Here is a link:
> https://github.com/mwette/guile-contrib/blob/main/patch/3.0.9/info-port.patch

The patch looks almost good to go to me.

But this looks wrong:


@@ -524,7 +524,7 @@ scm_set_current_input_port (SCM port)
 
 SCM
 scm_set_current_output_port (SCM port)
-#define FUNC_NAME "scm-set-current-output-port"
+#define FUNC_NAME "set-current-output-port"
 {
   SCM ooutp = scm_fluid_ref (cur_outport_fluid);
   port = SCM_COERCE_OUTPORT (port);

There’s also whitespace changes mixed in.


modified   module/ice-9/boot-9.scm
@@ -190,6 +190,13 @@ This is handy for tracing function calls, e.g.:
   (newline (current-warning-port))
   (car (last-pair stuff)))
 
+(define (info . stuff)
+  (newline (current-info-port))
+  (display ";;; FYI " (current-info-port))
+  (display stuff (current-info-port))
+  (newline (current-info-port))
+  (car (last-pair stuff)))
+


The canonical prefix is INFO, I think. So maybe

+  (display ";;; INFO " (current-info-port))

?

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]