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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#54668: closed ([PATCH 0/3] Turn diagnostic locations into
 hyperlinks)
Date: Fri, 08 Apr 2022 22:03:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 09 Apr 2022 00:02:15 +0200
with message-id <87tub38c9k.fsf_-_ <at> gnu.org>
and subject line Re: bug#54668: [PATCH 0/3] Turn diagnostic locations into hyperlinks
has caused the debbugs.gnu.org bug report #54668,
regarding [PATCH 0/3] Turn diagnostic locations into hyperlinks
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
54668: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54668
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 0/3] Turn diagnostic locations into hyperlinks
Date: Fri,  1 Apr 2022 16:59:55 +0200
Hello Guix!

This patch series shuffles things around and turns diagnostic
locations into hyperlinks.  That is, on terminals that support
it (GNOME Terminal, Terminology, Kitty, etc.¹), every time you see,
say:

  gnu/packages/foo.scm:300:42: warning: something's wrong

… the location prefix is now clickable.

I did not reexport the bindings moved to (guix diagnostics).  To
authors of software that uses Guix (GWL in particular), lemme know
if that’s a problem!

Ludo’.

¹ For some reasons xfce4-terminal no longer supports it; I think
  it used to.

Ludovic Courtès (3):
  ui: Move hyperlink facilities to (guix colors).
  ui: Move 'location->hyperlink' to (guix diagnostics).
  diagnostics: Turn diagnostic locations into hyperlinks.

 guix/colors.scm                | 35 +++++++++++++++++++++++++++++-
 guix/diagnostics.scm           | 16 +++++++++++++-
 guix/scripts/home.scm          |  1 +
 guix/scripts/system.scm        |  1 +
 guix/scripts/system/search.scm |  4 +++-
 guix/ui.scm                    | 39 ----------------------------------
 6 files changed, 54 insertions(+), 42 deletions(-)


base-commit: fc94e93c4b60addfda3c1eddfb85907e9459a8af
-- 
2.34.0



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 54668-done <at> debbugs.gnu.org
Subject: Re: bug#54668: [PATCH 0/3] Turn diagnostic locations into hyperlinks
Date: Sat, 09 Apr 2022 00:02:15 +0200
Hi,

Pushed as 13307c198bcd1fbd9364bcb7ef4c6d19d287cf2c!

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

> Maxime Devos <maximedevos <at> telenet.be> skribis:
>
>> Ludovic Courtès schreef op vr 01-04-2022 om 17:01 [+0200]:
>>> 
>>> +(define (hyperlink uri text)
>>> +  "Return a string that denotes a hyperlink using an OSC escape sequence as
>>> +documented at
>>> +<https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda>."
>>> +  (string-append "\x1b]8;;" uri "\x1b\\"
>>> +                 text "\x1b]8;;\x1b\\"))
>
> (This code was already there.)
>
>> What if 'uri' contains the character #\x1b, e.g.
>> "file://home/foo/\x15.scm"?  Does it need to be escaped?
>
> Good question.  I checked the spec linked above and it reads:
>
>   URI is the target of the hyperlink in URI-encoded form.
>
> So I guess we should pass ‘uri’ through ‘uri-encode’.  I’ll do that in a
> separate patch.

Actually this is already done by ‘file-hyperlink’ a few lines below, so
we’re fine.

Thanks,
Ludo’.


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.