[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug: [BUG] Interference of radio targets and external links [7.9
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Bug: [BUG] Interference of radio targets and external links [7.9.3e (7.9.3e-956-g3943be.dirty @ /home/vdyadov/Work/Tools/emacs/org-mode/lisp/)] |
Date: |
Sat, 16 Feb 2013 08:42:37 +0100 |
Hello,
Bastien <address@hidden> writes:
> address@hidden (Дядов Васил Стоянов) writes:
>
>> I've an issue with radio targets and ordinary external links.
>>
>> #+begin_src org
>> #+ATTR_HTML: border="1" frame="border" style="max-width:50%;"
>> | / | <> | <> | <> |
>> | | Test | Description | Source file |
>> |---+--------------+----------------+------------------------------|
>> | | <<<IDCT>>> | Inverse DCT | [[file:test/idct.c][idct.c]] |
>> |---+--------------+----------------+------------------------------|
>> #+end_src
>>
>> In this case external link "[[file:test/idct.c][idct.c]]" in html file
>> looks like: <a href="test/idct.c">.c</a>
>
> I confirm the bug, not only with the HTML exporter, but with the LaTeX
> exporter -- and probably all of them.
>
> For HTMl, the description of the second link is already wrong when
> `org-html-link' uses it as an argument. Probably something strange
> when setting the radio targets that prevents the link desc to be
> parsed correctly.
>
> I'll let Nicolas have a look when he has time.
Indeed. This was a two-part bug. I fixed the first one, but the second
one is non-trivial and yet to be fixed.
The problem is that "idct" in the link description is recognized as
a reference to the radio target <<<IDCT>>>.
In a perfect world, links wouldn't be allowed within link description,
and the problem wouldn't exist, but there's also the following construct
in Org:
[[http://orgmode.org][file:./unicorn.jpg]]
Obviously, the contents of the link is a link, and, in this case it even
makes sense. That's why links are allowed within links (and therefore
links to radio targets).
This is a limitation from Org syntax: it has no proper way to define an
"image" so it relies on links to display them. If there was an "image"
type object, I could easily allow images within links, but not links
themselves.
Anyway, I'll try to find a workaround.
Regards,
--
Nicolas Goaziou