emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: 徐春阳 <mail@xuchunyang.me>
Cc: emacs-orgmode@gnu.org
Subject: Re: 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	[thread overview]
Message-ID: <87twa23k74.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <871sxa7sdv.fsf@xuchunyang.me> ("徐春阳"'s message of "Wed, 14 Dec 2016 17:49:00 +0800")

Hello,

徐春阳 <mail@xuchunyang.me> 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	other threads:[~2016-12-17 10:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14  9:49 Bug: Incorrect result of exporting info link [9.0.1 (release_9.0.1-143-g469103 @ /home/xcy/src/org-mode/lisp/)] 徐春阳
2016-12-17 10:48 ` 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=87twa23k74.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@xuchunyang.me \
    /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).