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

"Dr. Arne Babenhauserheide" <arne_...@web.de> writes:
> Hello,
>
> the following patch makes Guile suppress the repl-welcome message when
> the GUILE_QUIET environment variable is set.
>
> From 5af642cb967942c7cb46b773431a44ceae1e7cbe Mon Sep 17 00:00:00 2001
> From: Arne Babenhauserheide <arne_...@web.de>
> Date: Tue, 9 Jan 2024 14:40:30 +0100
> Subject: [PATCH] GUILE_QUIET: suppress repl-welcome when GUILE_QUIET env is
>  set
>
> * module/system/repl/repl.scm (run-repl*): print welcome *unless* GUILE_QUIET 
> is set
> * doc/ref/guile-invoke.texi (Environment Variables): document GUILE_QUIET
> ---
>  doc/ref/guile-invoke.texi   | 5 +++++
>  module/system/repl/repl.scm | 3 ++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/doc/ref/guile-invoke.texi b/doc/ref/guile-invoke.texi
> index 856bce7b8..2e41d3afb 100644
> --- a/doc/ref/guile-invoke.texi
> +++ b/doc/ref/guile-invoke.texi
> @@ -424,6 +424,11 @@ Guile uses the environment variable @env{HOME}, the name 
> of your home
>  directory, to locate various files, such as @file{.guile} or
>  @file{.guile_history}.
>  
> +@item GUILE_QUIET
> +@vindex GUILE_QUIET
> +The Guile REPL usually shows a startup message. When the environment
> +variable @env{GUILE_QUIET} is set, this message is suppressed.
> +
>  @item GUILE_JIT_THRESHOLD
>  @vindex GUILE_JIT_THRESHOLD
>  Guile has a just-in-time (JIT) code generator that makes running Guile
> diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm
> index d83d28759..0fb71ca1c 100644
> --- a/module/system/repl/repl.scm
> +++ b/module/system/repl/repl.scm
> @@ -159,7 +159,8 @@
>    (% (with-fluids ((*repl-stack*
>                      (cons repl (or (fluid-ref *repl-stack*) '()))))
>         (if (null? (cdr (fluid-ref *repl-stack*)))
> -           (repl-welcome repl))
> +           (unless (getenv "GUILE_QUIET")
> +             (repl-welcome repl)))
>         (let prompt-loop ()
>           (let ((exp (prompting-meta-read repl)))
>             (cond
> -- 
> 2.41.0
>
>
> 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