unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
To: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
Cc: guile-devel@gnu.org
Subject: Re: GUILE_QUIET=1 guile → suppress REPL welcome message (fixed message format)
Date: Mon, 11 Mar 2024 02:01:36 +0100	[thread overview]
Message-ID: <87plw1r33p.fsf@web.de> (raw)
In-Reply-To: <87bk9ua4hw.fsf@web.de>

[-- Attachment #1: Type: text/plain, Size: 2411 bytes --]

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_bab@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_bab@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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

  reply	other threads:[~2024-03-11  1:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 13:43 GUILE_QUIET=1 guile => suppress REPL welcome message Dr. Arne Babenhauserheide
2024-01-09 15:50 ` GUILE_QUIET=1 guile → suppress REPL welcome message (fixed message format) Dr. Arne Babenhauserheide
2024-03-11  1:01   ` Dr. Arne Babenhauserheide [this message]
2024-03-11 13:50     ` Matt Wette
2024-03-11 19:41       ` Dr. Arne Babenhauserheide
2024-05-03 19:38       ` 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=87plw1r33p.fsf@web.de \
    --to=arne_bab@web.de \
    --cc=guile-devel@gnu.org \
    /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).