guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54668: [PATCH 0/3] Turn diagnostic locations into hyperlinks


From: Ludovic Courtès
Subject: bug#54668: [PATCH 0/3] Turn diagnostic locations into hyperlinks
Date: Sat, 09 Apr 2022 00:02:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi,

Pushed as 13307c198bcd1fbd9364bcb7ef4c6d19d287cf2c!

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

> Maxime Devos <maximedevos@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’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]