emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ox-html: Table of Contents not respecting CUSTOM_ID
@ 2015-06-29 21:08 Mitchel Humpherys
  2015-07-01 12:51 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Mitchel Humpherys @ 2015-06-29 21:08 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ox-html: Table of Contents not respecting CUSTOM_ID
  2015-06-29 21:08 ox-html: Table of Contents not respecting CUSTOM_ID Mitchel Humpherys
@ 2015-07-01 12:51 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2015-07-01 12:51 UTC (permalink / raw)
  To: Mitchel Humpherys; +Cc: emacs-orgmode

Hello,

Mitchel Humpherys <mitch.special@gmail.com> writes:

> It seems that my table of contents links are no longer using the
> CUSTOM_ID property.  Here's a minimal example:
>
> * My Cool Section
>   :PROPERTIES:
>   :CUSTOM_ID: my-cool-section
>   :END:
>
> * Other Section
>   Please refer to [[#my-cool-section]].

Fixed in e61bedadcbed598a2164899ee6b108ce18e57a30. Thank you.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-01 12:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29 21:08 ox-html: Table of Contents not respecting CUSTOM_ID Mitchel Humpherys
2015-07-01 12:51 ` Nicolas Goaziou

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).