From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?5b6Q5pil6Ziz?= Subject: Bug: Incorrect result of exporting info link [9.0.1 (release_9.0.1-143-g469103 @ /home/xcy/src/org-mode/lisp/)] Date: Wed, 14 Dec 2016 17:49:00 +0800 Message-ID: <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]:37744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cH6BW-0003N6-FY for emacs-orgmode@gnu.org; Wed, 14 Dec 2016 04:49:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cH6BS-00029M-Jk for emacs-orgmode@gnu.org; Wed, 14 Dec 2016 04:49:14 -0500 Received: from smtpproxy19.qq.com ([184.105.206.84]:36292) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cH6BS-00028g-A4 for emacs-orgmode@gnu.org; Wed, 14 Dec 2016 04:49:10 -0500 Received: from ubuntu (unknown [117.60.87.194]) by esmtp4.qq.com (ESMTP) with SMTP id 0 for ; Wed, 14 Dec 2016 17:49:00 +0800 (CST) 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: emacs-orgmode@gnu.org Hi org-mode list. 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 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. BTW, I'm relative new to org-mode and the mailing list. I have some questions: 1) does org-mode have a bug track system? Before reporting a bug, I would like to make sure it's not already reported. 2) I notice that subjects of mails in the mailing list are all prefixed with "[O]", I guess it is for filtering. My question is: do I need to add "[O]" at the beginning of my subject manually? or is it added automatically? Thanks for your help. =E5=BE=90=E6=98=A5=E9=98=B3 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