emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Bastien <bzg@altern.org>
Cc: "Дядов Васил Стоянов" <vdyadov@elvees.com>, emacs-orgmode@gnu.org
Subject: Re: 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	[thread overview]
Message-ID: <8738ww7lhu.fsf@gmail.com> (raw)
In-Reply-To: <87liapcmjs.fsf@bzg.ath.cx> (Bastien's message of "Fri, 15 Feb 2013 22:08:39 +0100")

Hello,

Bastien <bzg@altern.org> writes:

> vdyadov@elvees.com (Дядов Васил Стоянов) 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

      reply	other threads:[~2013-02-16  7:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 11:09 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/)] Дядов Васил Стоянов
2013-02-15 21:08 ` Bastien
2013-02-16  7:42   ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8738ww7lhu.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=vdyadov@elvees.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).