From: Daniel Clemente <n142857@gmail.com>
To: Sebastian Rose <sebastian_rose@gmx.de>
Cc: Bernt Hansen <bernt@norang.ca>,
org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Re: Custom entry IDs in HTML export
Date: Mon, 30 Mar 2009 13:49:56 +0200 [thread overview]
Message-ID: <871vsfjkm3.fsf@CPU107.opentrends.net> (raw)
In-Reply-To: <87y6uqwsjw.fsf@kassiopeya.MSHEIMNETZ> (Sebastian Rose's message of "Fri, 27 Mar 2009 22:32:58 +0100")
El dv, mar 27 2009, Sebastian Rose va escriure:
>
> What we have now, just as Carstens said:
>
> # <<human-readable>>
> * Section B
>
> Creates this headline in HTML:
>
> <h2 id="sec-2"><a name="human-readable" id="human-readable"></a>2 Section B </h2>
>
> 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
> # <<human-readable>>
> * Section B
then the comment appears at the end of the previous section, and you can miss it when you are viewing the heading „Section B“. I would swap both lines (solution 1):
> * Section B
> # <<human-readable>>
But since there are already LOGBOOK drawers under the heading, it would be 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:
> <h2 id="sec-2"><a name="human-readable" id="human-readable"></a>2 Section B </h2>
(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 (and together with other things).
Solution 2 involves thus: a new property to specify the human-readable entry 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 <a> 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 <h3>'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 <a>'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 also 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 find what they searched
Greetings,
Daniel
next prev parent reply other threads:[~2009-03-30 11:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 12:47 Custom entry IDs in HTML export Daniel Clemente
2009-03-27 16:16 ` Carsten Dominik
2009-03-27 17:57 ` Bernt Hansen
2009-03-27 21:32 ` Sebastian Rose
2009-03-30 11:49 ` Daniel Clemente [this message]
2009-04-16 6:55 ` Carsten Dominik
2009-04-16 8:50 ` Sebastian Rose
2009-04-16 11:28 ` Carsten Dominik
2009-04-16 13:14 ` Sebastian Rose
2009-04-16 17:14 ` Carsten Dominik
2009-04-16 20:50 ` Sebastian Rose
2009-04-16 21:26 ` Carsten Dominik
2009-04-16 22:37 ` Sebastian Rose
2009-04-17 4:11 ` Carsten Dominik
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=871vsfjkm3.fsf@CPU107.opentrends.net \
--to=n142857@gmail.com \
--cc=bernt@norang.ca \
--cc=emacs-orgmode@gnu.org \
--cc=sebastian_rose@gmx.de \
/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).