From: Mitchel Humpherys <mitch.special@gmail.com>
To: emacs-orgmode@gnu.org
Subject: ox-html: Table of Contents not respecting CUSTOM_ID
Date: Mon, 29 Jun 2015 14:08:03 -0700 [thread overview]
Message-ID: <vnkw4mlqrznw.fsf@mitchelh-linux1.qualcomm.com> (raw)
Hi,
It seems that my table of contents links are no longer using the
CUSTOM_ID property. Here's a minimal example:
--8<---------------cut here---------------start------------->8---
* My Cool Section
:PROPERTIES:
:CUSTOM_ID: my-cool-section
:END:
* Other Section
Please refer to [[#my-cool-section]].
--8<---------------cut here---------------end--------------->8---
Which exports as (trimmed down to just the body):
--8<---------------cut here---------------start------------->8---
<body>
<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgheadline1">1. My Cool Section</a></li>
<li><a href="#orgheadline2">2. Other Section</a></li>
</ul>
</div>
</div>
<div id="outline-container-orgheadline1" class="outline-2">
<h2 id="my-cool-section"><a id="orgheadline1"></a><span class="section-number-2">1</span> My Cool Section</h2>
<div class="outline-text-2" id="text-my-cool-section">
</div>
</div>
<div id="outline-container-orgheadline2" class="outline-2">
<h2 id="orgheadline2"><span class="section-number-2">2</span> Other Section</h2>
<div class="outline-text-2" id="text-2">
<p>
Please refer to <a href="#my-cool-section">1</a>.
</p>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Mitchel Humpherys</p>
<p class="date">Created: 2015-06-29 Mon 14:04</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
--8<---------------cut here---------------end--------------->8---
Specifically, you can see that the headline is linking to #orgheadline1:
<li><a href="#orgheadline1">1. My Cool Section</a></li>
The internal link seems to be using the CUSTOM_ID, as expected:
Please refer to <a href="#my-cool-section">1</a>.
Maybe I'm missing some new config option?
I'm using org-mode master, currently at [a833d35159fd: "ox: Properly fix
internal regexps after each buffer change"] (from 6 days ago). Notably,
I do have [b856f66892b8: "ox-html: Prefer custom ID over internal
references for links to headlines"], which seems to have fixed a similar
problem with internal links to headlines.
--
Mitch
next reply other threads:[~2015-06-29 21:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 21:08 Mitchel Humpherys [this message]
2015-07-01 12:51 ` ox-html: Table of Contents not respecting CUSTOM_ID Nicolas Goaziou
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=vnkw4mlqrznw.fsf@mitchelh-linux1.qualcomm.com \
--to=mitch.special@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).