emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Aviv <aviv@usna.edu>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Renaming of +NAME for code blocks to in HTML export, no longer user defined
Date: Tue, 5 Jan 2016 11:44:59 -0500	[thread overview]
Message-ID: <CAJV1HcwBeszO49zn_--RYefLuaWOAKq8oa8vYjRYV_ZxYG_X5w@mail.gmail.com> (raw)
In-Reply-To: <87lh85b3ly.fsf@alphaville.usersys.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

On Mon, Jan 4, 2016 at 1:29 PM, Nick Dokos <ndokos@gmail.com> wrote:

> It may be a bug: the code (in org-html-src-block) looks like this
>
>           (label (let ((lbl (and (org-element-property :name src-block)
>                                  (org-export-get-reference src-block
> info))))
>                    (if lbl (format " id=\"%s\"" lbl) ""))))
>
> and I'm wondering whether the "and" should be an "or".
>

Interesting. I don't know if it is a bug, though, as this seems intentional
and matches my experience. The idea being that if you want to label
something, you use the :name tag, but this will make it so the second item
is evaluated, producing a unique identifier. The unique identifier is then
assigned instead of the :name tag. If it was an, OR, however, then every
element block would get a label, and that might be suboptimal given that
not every block is referenced later.

I would still like to be able to add my own name tags, but understand why
this might have been changed to avoid to blocks having the same label.


-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*

[-- Attachment #2: Type: text/html, Size: 2105 bytes --]

  reply	other threads:[~2016-01-05 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04 18:04 Renaming of +NAME for code blocks to in HTML export, no longer user defined Adam Aviv
2016-01-04 18:29 ` Nick Dokos
2016-01-05 16:44   ` Adam Aviv [this message]
2016-01-21  9:20     ` Nicolas Goaziou
2016-01-21 14:21       ` Adam Aviv

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=CAJV1HcwBeszO49zn_--RYefLuaWOAKq8oa8vYjRYV_ZxYG_X5w@mail.gmail.com \
    --to=aviv@usna.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /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).