emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: Incorrect result of exporting info link [9.0.1 (release_9.0


From: Nicolas Goaziou
Subject: Re: [O] Bug: Incorrect result of exporting info link [9.0.1 (release_9.0.1-143-g469103 @ /home/xcy/src/org-mode/lisp/)]
Date: Sat, 17 Dec 2016 11:48:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hello,

徐春阳 <address@hidden> writes:

> At (info "(emacs) Echo Area"), 'M-x org-store-link' stores the link as:
>
> [[info:emacs#Echo%20Area][info:emacs#Echo Area]]
>
> however org doesn't export it correctly, for example, the result of html
> export is:
>
> <a 
> href="http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Echo-Area";><a
>  
> href="http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Echo";>emacs#Echo</a>
>  Area</a>
>
> the correct result should be:
>
> <a 
> href="http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Echo-Area";>emacs#Echo
>  Area</a
>
> and the result of ASCII export is:
>
> [[info:emacs#Echo] Area]
> [[info:emacs#Echo] Area] info:emacs#Echo%20Area
>
> the correct result should be:
>
> [info:emacs#Echo Area]
> [info:emacs#Echo Area] info:emacs#Echo%20Area
>
> I tried to debug this by inserting
>
> (message "-> org-info-export: path: [%s] desc: [%s]" path desc)
>
> at the beginning of org-info-export, then export, it shows
>
> -> org-info-export: path: [emacs#Echo] desc: [nil]
> -> org-info-export: path: [emacs#Echo Area] desc: [[info:emacs#Echo] Area] [2 
> times]
>
> It looks like one info link is exported three times.

It's not really a bug in the exporter, but rather a poor parser design
decision. Basically "info:emacs#Echo" is a valid link in Org, even as
a description of another link.

I removed nested links in parser. Instead I added a tool in "ox.el",
namely `org-export-insert-image-links' to add them whenever a back-end
can make use of them.

I made that change in master. So, the issue should be fixed there.

Thank you.

Regards,

-- 
Nicolas Goaziou



reply via email to

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