From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Aviv 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 Message-ID: References: <87lh85b3ly.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11425fba763776052898f692 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGUjY-0000Go-Jw for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 11:45:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGUjX-0005qk-DX for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 11:45:20 -0500 Received: from mail-vk0-x229.google.com ([2607:f8b0:400c:c05::229]:35863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGUjX-0005qV-7B for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 11:45:19 -0500 Received: by mail-vk0-x229.google.com with SMTP id f2so230177266vkb.3 for ; Tue, 05 Jan 2016 08:45:19 -0800 (PST) In-Reply-To: <87lh85b3ly.fsf@alphaville.usersys.redhat.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nick Dokos Cc: emacs-orgmode@gnu.org --001a11425fba763776052898f692 Content-Type: text/plain; charset=UTF-8 On Mon, Jan 4, 2016 at 1:29 PM, Nick Dokos 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* --001a11425fba763776052898f692 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= 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) lo= oks like this

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (label (let ((lbl (and (org-element-prop= erty :name src-block)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-export-get-reference src-= block info))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if lb= l (format " id=3D\"%s\"" lbl) ""))))

and I'm wondering whether the "and" should be an "or&quo= t;.

Interesting. I don't know if it is a bu= g, though, as this seems intentional and matches my experience. The idea be= ing that if you want to label something, you use the :name tag, but this wi= ll 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 bee= n changed to avoid to blocks having the same label.=C2=A0


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