From: "Ludovic Courtès" <ludo@gnu.org>
To: 54668@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#54668] [PATCH 3/3] diagnostics: Turn diagnostic locations into hyperlinks.
Date: Fri, 1 Apr 2022 17:01:46 +0200 [thread overview]
Message-ID: <20220401150146.32529-3-ludo@gnu.org> (raw)
In-Reply-To: <20220401150146.32529-1-ludo@gnu.org>
* guix/diagnostics.scm (print-diagnostic-prefix): Use
'location->hyperlink' when 'supports-hyperlinks?' returns true.
---
guix/diagnostics.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/guix/diagnostics.scm b/guix/diagnostics.scm
index 2b8cee1ccb..bf1ced8140 100644
--- a/guix/diagnostics.scm
+++ b/guix/diagnostics.scm
@@ -204,7 +204,10 @@ (define prefix-color
(gettext prefix %gettext-domain))))
(if location
(format (guix-warning-port) "~a: ~a"
- (location-color (location->string location))
+ (location-color
+ (if (supports-hyperlinks? (guix-warning-port))
+ (location->hyperlink location)
+ (location->string location)))
(prefix-color prefix))
(format (guix-warning-port) "~:[~*~;guix ~a: ~]~a"
(program-name) (program-name)
--
2.34.0
next prev parent reply other threads:[~2022-04-01 15:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 14:59 [bug#54668] [PATCH 0/3] Turn diagnostic locations into hyperlinks Ludovic Courtès
2022-04-01 15:01 ` [bug#54668] [PATCH 1/3] ui: Move hyperlink facilities to (guix colors) Ludovic Courtès
2022-04-01 15:01 ` [bug#54668] [PATCH 2/3] ui: Move 'location->hyperlink' to (guix diagnostics) Ludovic Courtès
2022-04-01 15:01 ` Ludovic Courtès [this message]
2022-04-01 15:44 ` [bug#54668] [PATCH 1/3] ui: Move hyperlink facilities to (guix colors) Maxime Devos
2022-04-04 12:10 ` [bug#54668] [PATCH 0/3] Turn diagnostic locations into hyperlinks Ludovic Courtès
2022-04-08 22:02 ` bug#54668: " Ludovic Courtès
2022-04-09 9:27 ` [bug#54668] " Maxime Devos
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220401150146.32529-3-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=54668@debbugs.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.