From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: Re: Re: Custom entry IDs in HTML export Date: Mon, 30 Mar 2009 13:49:56 +0200 Message-ID: <871vsfjkm3.fsf@CPU107.opentrends.net> References: <87myb7w2s9.fsf@CPU107.opentrends.net> <6BF0FCBC-4343-4B8C-9A16-F4B9AC9B0F48@gmail.com> <87eiwiluft.fsf@gollum.intra.norang.ca> <87y6uqwsjw.fsf@kassiopeya.MSHEIMNETZ> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LoG0F-0002Gi-Kc for emacs-orgmode@gnu.org; Mon, 30 Mar 2009 07:50:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LoG0B-0002Fo-0P for emacs-orgmode@gnu.org; Mon, 30 Mar 2009 07:50:07 -0400 Received: from [199.232.76.173] (port=40507 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LoG0A-0002Fh-T1 for emacs-orgmode@gnu.org; Mon, 30 Mar 2009 07:50:02 -0400 Received: from mail-fx0-f166.google.com ([209.85.220.166]:52079) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LoG0A-0004FD-9g for emacs-orgmode@gnu.org; Mon, 30 Mar 2009 07:50:02 -0400 Received: by fxm10 with SMTP id 10so1845745fxm.42 for ; Mon, 30 Mar 2009 04:50:00 -0700 (PDT) In-Reply-To: <87y6uqwsjw.fsf@kassiopeya.MSHEIMNETZ> (Sebastian Rose's message of "Fri, 27 Mar 2009 22:32:58 +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: Sebastian Rose Cc: Bernt Hansen , org-mode mailing list El dv, mar 27 2009, Sebastian Rose va escriure: > > What we have now, just as Carstens said: > > # <> > * Section B > > Creates this headline in HTML: > >

2= Section B

> > This is enough for all the use cases I can think of. > Yes, this is enough except for two things: 1. The TOC still links to #sec-2 and the user can't change that 2. Your syntax doesn't fold very well in the outliner. I mean: if you use > # <> > * Section B then the comment appears at the end of the previous section, and you can = miss it when you are viewing the heading =E2=80=9ESection B=E2=80=9C. I wou= ld swap both lines (solution 1): > * Section B > # <> But since there are already LOGBOOK drawers under the heading, it would b= e a lot clearer to use a property, like EXPORT_ID (solution 2): > * Section B > :PROPERTIES: > :EXPORT_ID: human-readable > :END: In this way, the TOC can reliably find the EXPORT_ID, and then generate: >

2= Section B

(You could also leave *just* the human-readable id, but having two is not= bad. I would prefer solution 1, but I don't because I'm not sure that the TOC = can find the ID if it is written as a comment anywhere under the heading (a= nd together with other things). Solution 2 involves thus: a new property to specify the human-readable en= try ID, which will be used to link to the entry. The automatic ID (#sec-2) = will still work for all entrys. > > * Distinguishing automatic and human readable IDs > > One thing I like is, that we now _can_ distinguish the > `human-readable-target' (human readable) from the `sec-2' (not human > readable and not context related) using a regular expression. > > In org-info.js, I can now prefere the human readable ID in from an > automatic created one, and thus use that to create the links for `l' > and `L'. The same holds true for other programming languages and > parsers. > > If we open the

's ID for user defined values (bad), we can not > distinguish those ID's using a regular expression and there is no way > to detect the human readable one. There will be no way to _know_ that > the 's ID is the prefered one used for human readable links. > Solution 2 doesn't break the parsing techniques you use; in fact it can a= lso make clearer which ID is the human readable one and which one not. This is not extremely important; just useful: - for pages with many incoming links from external sites - to ensure link integrity (now you can't assure that links will still work= in 1 year ... or in some weeks) - to avoid that HTML visitors get directed to a wrong section and can't fin= d what they searched Greetings, Daniel