GNU bug report logs - #54668
[PATCH 0/3] Turn diagnostic locations into hyperlinks

Previous Next

Package: guix-patches;

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

Date: Fri, 1 Apr 2022 15:01:01 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


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

From: Ludovic Courtès <ludo <at> gnu.org>
To: 54668 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 3/3] diagnostics: Turn diagnostic locations into hyperlinks.
Date: Fri,  1 Apr 2022 17:01:46 +0200
* 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





This bug report was last modified 3 years and 47 days ago.

Previous Next


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