GNU bug report logs - #62222
[PATCH] ui: format 'display-hint' output when no arguments are passed.

Previous Next

Package: guix-patches;

Reported by: Antero Mejr <antero <at> mailbox.org>

Date: Thu, 16 Mar 2023 16:12:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62222 in the body.
You can then email your comments to 62222 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to ludo <at> gnu.org, guix-patches <at> gnu.org:
bug#62222; Package guix-patches. (Thu, 16 Mar 2023 16:12:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Antero Mejr <antero <at> mailbox.org>:
New bug report received and forwarded. Copy sent to ludo <at> gnu.org, guix-patches <at> gnu.org. (Thu, 16 Mar 2023 16:12:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Antero Mejr <antero <at> mailbox.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] ui: format 'display-hint' output when no arguments are passed.
Date: Thu, 16 Mar 2023 16:11:20 +0000
When display-hint is given format specifiers such as "~%" but no arguments,
it does not format the output, causing the specifiers to be visible in the
displayed text.

* guix/ui.scm (display-hint): Format output when no arguments are passed.
---
Steps to reproduce the issue this fixes:
$ guix build -s whatever hello

guix build: error: 'whatever' is not a supported system
hint: Try `--list-systems' to view available system types.~%

 guix/ui.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index b6c3bd04ba..7540e2194f 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -323,7 +323,7 @@ (define colorize
    ;; XXX: We should arrange so that the initial indent is wider.
    (parameterize ((%text-width (max 15 (- (terminal-columns) 5))))
      (texi->plain-text (match arguments
-                         (() message)
+                         (() (format #f message))
                          (_  (apply format #f message
                                     (map (match-lambda
                                            ((? string? str)
-- 
2.38.1





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 17 Mar 2023 21:09:02 GMT) Full text and rfc822 format available.

Notification sent to Antero Mejr <antero <at> mailbox.org>:
bug acknowledged by developer. (Fri, 17 Mar 2023 21:09:02 GMT) Full text and rfc822 format available.

Message #10 received at 62222-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Antero Mejr <antero <at> mailbox.org>
Cc: 62222-done <at> debbugs.gnu.org
Subject: Re: [bug#62222] [PATCH] ui: format 'display-hint' output when no
 arguments are passed.
Date: Fri, 17 Mar 2023 22:08:11 +0100
Hi,

Antero Mejr <antero <at> mailbox.org> skribis:

> When display-hint is given format specifiers such as "~%" but no arguments,
> it does not format the output, causing the specifiers to be visible in the
> displayed text.
>
> * guix/ui.scm (display-hint): Format output when no arguments are passed.

Oops, good catch!  Applied, thanks.

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 15 Apr 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.