From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou 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 Message-ID: <87twa23k74.fsf@nicolasgoaziou.fr> References: <871sxa7sdv.fsf@xuchunyang.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cICXV-0006lS-Pe for emacs-orgmode@gnu.org; Sat, 17 Dec 2016 05:48:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cICXU-0001Lu-OV for emacs-orgmode@gnu.org; Sat, 17 Dec 2016 05:48:29 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:33747) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cICXU-0001Kn-IQ for emacs-orgmode@gnu.org; Sat, 17 Dec 2016 05:48:28 -0500 In-Reply-To: <871sxa7sdv.fsf@xuchunyang.me> (=?utf-8?B?IuW+kOaYpemYsyIn?= =?utf-8?B?cw==?= message of "Wed, 14 Dec 2016 17:49:00 +0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: =?utf-8?B?5b6Q5pil6Ziz?= Cc: emacs-orgmode@gnu.org Hello, =E5=BE=90=E6=98=A5=E9=98=B3 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: > > emacs#Echo Area > > the correct result should be: > > emacs#Echo Area > 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, --=20 Nicolas Goaziou