emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Links


From: Nicolas Goaziou
Subject: Re: [O] Links
Date: Tue, 16 Jun 2015 14:50:19 +0200

Hello,

Fabrice Popineau <address@hidden> writes:

> Assume the following file :

[...]

> ** First link

[...]

> ** Second link
> [2015-06-16 mar. 13:58]
>
> - [[First%20link][First link]]

[...]

> The exporter fails to resolve the (fuzzy) link "First%20link".
> However, if I click on the link, I jump to the right heading.
>
> Am I missing something or should this be made consistent ?

You are not missing something, but making it consistent is not as
trivial as it sounds.

The problem is that, AFAIK, we cannot tell if a given string is
url-encoded or not. Also, url-encoding is not idempotent.

So, export process doesn't url-decode links, and cannot handle the link
above. OTOH, `org-open-at-point' assumes links are url-encoded (and they
are if you stored them with `org-store-link') so it url-decodes the link
above and is able to follow it.

I think it would be a mistake to expect all links to be url-encoded as
it is a pain when you enter most of your internal links manually.
However, forbidding url-encoding for internal links is also a mistake
because some of them cannot be expressed otherwise (e.g., headlines
containing square brackets). The current situation is also problematic,
of course. Well.

At this point, it seems that all is left are cheesy approaches. E.g,
when a path matches "%[A-Za-z0-9]\\{2\\}", decode it during export. This
leaves pathological cases (e.g., when you really meant, for some very
good reason, to have a headline called "* %25"), though. That's not
great either.

WDYT?

Regards,

-- 
Nicolas Goaziou



reply via email to

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