From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Alexiev Subject: [BUG] org-html.el: internal links don't work unless CUSTOM_ID is used Date: Sun, 30 Jan 2011 14:48:00 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=56151 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjYZw-0000db-5d for emacs-orgmode@gnu.org; Sun, 30 Jan 2011 09:48:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjYZe-0002gL-FU for emacs-orgmode@gnu.org; Sun, 30 Jan 2011 09:48:19 -0500 Received: from lo.gmane.org ([80.91.229.12]:58701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjYZe-0002gE-90 for emacs-orgmode@gnu.org; Sun, 30 Jan 2011 09:48:18 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PjYZc-0001Ee-Kg for emacs-orgmode@gnu.org; Sun, 30 Jan 2011 15:48:16 +0100 Received: from 85.239.150.142 ([85.239.150.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Jan 2011 15:48:16 +0100 Received: from vladimir by 85.239.150.142 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Jan 2011 15:48:16 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Internal links do not work in HTML export unless CUSTOM_ID is used. I have tried with [[id:]] and [[*Heading]] links. It makes the link like this: It makes the anchor like this:

...

and if the entry has ID (id: link is used) then also
Unfortunately h2.id doesn't create an anchor, and even for id: links it uses , which doesn't work. I wondered how links in WORK work, so I checked, e.g. http://orgmode.org/worg/org-contrib/babel/intro.html The link is denoted like this [[#source-code-execution][here]] and the target like this: * Source Code Execution :PROPERTIES: :CUSTOM_ID: source-code-execution :END: Indeed the Org manual advises: The most important case is a link like `[[#my-custom-id]]' which will link to the entry with the `CUSTOM_ID' property `my-custom-id'. Such custom IDs are very good for HTML export (*note HTML export::) where they produce pretty section links. But it would be very tedious to add CUSTOM_ID to every target, and the manual also hints to it: You are responsible yourself to make sure these custom IDs are unique Having to go out and make a target interrupts one's flow. It's much faster to type "[[*He" and use completion to create the link. That's why I've marked this "BUG" and not "Enhancement".