emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Bug: Tildes in URL impact visible link text [9.3 (release_9.3 @ /usr


From: Chris Hunt
Subject: Re: Bug: Tildes in URL impact visible link text [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]
Date: Sun, 27 Dec 2020 18:54:06 -0500

> If it's just that case, you can try replacing each
> tilde with %7E (see
> https://www.w3schools.com/tags/ref_urlencode.asp). That way the
> link description would have to be formatted correctly, without spurious
> characters.

That's a good workaround, thank you. Manually replacing "~" in the URL
with "%7E" results in the expected
description ("metrics"). Using that link in Firefox navigates to the
page successfully, too.

I looked at the problem some more. I think the underlying behavior
leading to the bug is that `org-activate-links` sets an
`invisible` text property on the URL and brackets of link text.
`org-activate-code`, which runs afterwards, identifies
"code" in a way that isn't aware of links, then proceeds to drop the
"invisible" property. That behavior makes sense,
since in the usual case we're removing properties so the text is
displayed verbatim, but not when the whole text is contained
in the URL section of a link.



reply via email to

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