emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* CUSTOM_ID doesn't work for HTML export on Org trunk
@ 2015-06-09 15:34 Oleh Krehel
  2015-06-09 19:04 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Oleh Krehel @ 2015-06-09 15:34 UTC (permalink / raw)
  To: emacs-orgmode


Hi all,

I don't know if this has been raised before, but it seems not to be
fixed yet.  Currently, in HTML export, instead of #custom_id I'm getting
e.g. #orgheadline10.

The commit that broke this was 2 months ago:
160820bc9498e9364103e72b55a27cf92576dbb8 still works fine.

Let me know if this is bug that needs to be fixed, or maybe CUSTOM_ID
was replaced with something.

regards,
Oleh

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

* Re: CUSTOM_ID doesn't work for HTML export on Org trunk
  2015-06-09 15:34 CUSTOM_ID doesn't work for HTML export on Org trunk Oleh Krehel
@ 2015-06-09 19:04 ` Nicolas Goaziou
  2015-06-10  8:11   ` Oleh Krehel
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2015-06-09 19:04 UTC (permalink / raw)
  To: Oleh Krehel; +Cc: emacs-orgmode

Hello,

Oleh Krehel <ohwoeowho@gmail.com> writes:

> I don't know if this has been raised before, but it seems not to be
> fixed yet.  Currently, in HTML export, instead of #custom_id I'm getting
> e.g. #orgheadline10.

The following buffer

--8<---------------cut here---------------start------------->8---
* Headline
  :PROPERTIES:
  :CUSTOM_ID: my-id
  :END:
--8<---------------cut here---------------end--------------->8---

exports as

--8<---------------cut here---------------start------------->8---
<div id="outline-container-orgheadline1" class="outline-2">
  <h2 id="my-id"><a id="orgheadline1"></a><span class="section-number-2">1</span> Headline</h2>
  <div class="outline-text-2" id="text-my-id">
  </div>
</div>
--8<---------------cut here---------------end--------------->8---

It looks correct.

Regards,

-- 
Nicolas Goaziou

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

* Re: CUSTOM_ID doesn't work for HTML export on Org trunk
  2015-06-09 19:04 ` Nicolas Goaziou
@ 2015-06-10  8:11   ` Oleh Krehel
  2015-06-10 11:34     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Oleh Krehel @ 2015-06-10  8:11 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,

Thanks for helping.

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> The following buffer
>
> * Headline
>   :PROPERTIES:
>   :CUSTOM_ID: my-id
>   :END:
>
>
> exports as
>
> <div id="outline-container-orgheadline1" class="outline-2">
>   <h2 id="my-id"><a id="orgheadline1"></a><span class="section-number-2">1</span> Headline</h2>
>   <div class="outline-text-2" id="text-my-id">
>   </div>
> </div>

I'm getting the same behavior.

> It looks correct.

It's not: I'm getting this in my Firefox address bar if I click the link:

    testorg.html#orgheadline1

Here's the two months old export behavior:

    <div id="outline-container-my-id" class="outline-2">
    <h2 id="my-id"><a id="sec-1"></a><span class="section-number-2">1</span> Headline</h2>
    <div class="outline-text-2" id="text-my-id">
    </div>

And the corresponding Firefox bar:

    testorg.html#my-id

regards,
Oleh

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

* Re: CUSTOM_ID doesn't work for HTML export on Org trunk
  2015-06-10  8:11   ` Oleh Krehel
@ 2015-06-10 11:34     ` Nicolas Goaziou
  2015-06-10 11:53       ` Oleh Krehel
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2015-06-10 11:34 UTC (permalink / raw)
  To: Oleh Krehel; +Cc: emacs-orgmode

Oleh Krehel <ohwoeowho@gmail.com> writes:

> It's not: I'm getting this in my Firefox address bar if I click the link:
>
>     testorg.html#orgheadline1

What link? There is no link in your example.

The code generated for headlines is correct. However, links indeed
target internal reference instead of custom ID. I changed to behaviour
so they prefer custom ID (b856f66892b8fbf827e4b4a3e89e739a9caca051).

Thanks.

Regards,

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

* Re: CUSTOM_ID doesn't work for HTML export on Org trunk
  2015-06-10 11:34     ` Nicolas Goaziou
@ 2015-06-10 11:53       ` Oleh Krehel
  0 siblings, 0 replies; 5+ messages in thread
From: Oleh Krehel @ 2015-06-10 11:53 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Oleh Krehel <ohwoeowho@gmail.com> writes:
>
>> It's not: I'm getting this in my Firefox address bar if I click the link:
>>
>>     testorg.html#orgheadline1
>
> What link? There is no link in your example.

The link to the headline in the table of contents.

> The code generated for headlines is correct. However, links indeed
> target internal reference instead of custom ID. I changed to behaviour
> so they prefer custom ID (b856f66892b8fbf827e4b4a3e89e739a9caca051).

This solves the problem for me, thanks.

Oleh

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

end of thread, other threads:[~2015-06-10 11:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-09 15:34 CUSTOM_ID doesn't work for HTML export on Org trunk Oleh Krehel
2015-06-09 19:04 ` Nicolas Goaziou
2015-06-10  8:11   ` Oleh Krehel
2015-06-10 11:34     ` Nicolas Goaziou
2015-06-10 11:53       ` Oleh Krehel

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