emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Aaron Miller <me@aaron-miller.me>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: HTML export fails to set source IDs correctly [8.3.4 (8.3.4-elpa @ /Users/aaron/.emacs.d/elpa/org-20160222/)]
Date: Thu, 25 Feb 2016 21:19:53 +0100	[thread overview]
Message-ID: <8760xc1r12.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <56CE5C4D.5090100@aaron-miller.me> (Aaron Miller's message of "Wed, 24 Feb 2016 20:43:41 -0500")

Hello,

Aaron Miller <me@aaron-miller.me> writes:

> Expected: When exporting an Org document with named source blocks to 
> HTML, each <pre> generated to contain a source block has an ID attribute 
> matching the source block's name.
>
> Actual: Instead, ID attributes come out with values like "orgsrcblock1".
>
> Test case:
> --- >8 cut here ---
> #+TITLE: bug test case
>
> #+NAME: a-source-block
> #+BEGIN_SRC emacs-lisp :eval never
> ;; hi
> #+END_SRC
> --- 8< cut here ---
>
> Expected result (its salient subset):
> --- >8 cut here ---
> <pre class="src src-emacs-lisp" id="a-source-block">
> ;; hi
> </pre>
> --- 8< cut here ---
>
> Actual result (its likewise):
> --- >8 cut here ---
> <pre class="src src-emacs-lisp" id="orgsrcblock1">
> ;; hi
> </pre>
> --- 8< cut here ---
>
> Note the erroneous ID attribute value.

The attribute is intended.

> The issue here is that, in `org-html-src-block' and 
> `org-html-inline-src-block', the fallback behavior for ID attribute 
> value is implemented in terms of `and', rather than `or'. Since `and' 
> short-circuits only when it encounters a null argument, the desired 
> behavior is effectively inverted.

Actually this is the desired behaviour: when a label is specified, make
sure to replace it with our internal unique and safe label. Hence the
`and'.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2016-02-25 20:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25  1:43 Bug: HTML export fails to set source IDs correctly [8.3.4 (8.3.4-elpa @ /Users/aaron/.emacs.d/elpa/org-20160222/)] Aaron Miller
2016-02-25 20:19 ` Nicolas Goaziou [this message]
2016-02-25 21:38   ` Aaron Miller
2016-02-27  8:38     ` Nicolas Goaziou
2016-02-28 16:00       ` Aaron Miller
2016-02-28 16:24         ` 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=8760xc1r12.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=me@aaron-miller.me \
    /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).