emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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-13 11:09 Дядов Васил Стоянов
  2013-02-15 21:08 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Дядов Васил Стоянов @ 2013-02-13 11:09 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

Hi!

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>


Emacs  : GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9)
 of 2012-12-25 on canopus-pc.elvees.com
Package: Org-mode version 7.9.3e (7.9.3e-956-g3943be.dirty @ /home/vdyadov/Work/Tools/emacs/org-mode/lisp/)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* 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/)]
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2013-02-15 21:08 UTC (permalink / raw)
  To: Дядов Васил Стоянов
  Cc: emacs-orgmode

Hi,

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.

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 3+ messages in thread

* 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/)]
  2013-02-15 21:08 ` Bastien
@ 2013-02-16  7:42   ` Nicolas Goaziou
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2013-02-16  7:42 UTC (permalink / raw)
  To: Bastien
  Cc: Дядов Васил Стоянов,
	emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-16  7:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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).