From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QEpVArW55GP9FAEAbAwnHQ (envelope-from ) for ; Thu, 09 Feb 2023 10:15:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mBk4ArW55GOXWAEAauVa8A (envelope-from ) for ; Thu, 09 Feb 2023 10:15:33 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 73E2A36D56 for ; Thu, 9 Feb 2023 10:15:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ30w-0007oi-DW; Thu, 09 Feb 2023 04:14:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ30u-0007oZ-H2 for emacs-orgmode@gnu.org; Thu, 09 Feb 2023 04:14:44 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ30r-0003VJ-Sv for emacs-orgmode@gnu.org; Thu, 09 Feb 2023 04:14:44 -0500 Received: from eduroam-82-218.eduroam.wifi.biologie.ens.fr (hoori-5.ens.fr [129.199.31.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 2A4B3561204; Thu, 9 Feb 2023 10:14:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=polytechnique.org; s=svoboda; t=1675934076; bh=A+/yUK1my3KWZ1TwZMEiIRX9W4v+HZHnaefv3PQSXx8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID; b=huQ8lLMTXJeT4pufpuhTQFpgxMmLAWjG+8MUOVCGLClnJWOFyRjCpgEmfJWvGlkRg OB1fepvjWq/noR9L6DiVbJSWKtJBGJDCjdk3QVk9miQLbxBJLBMjSNNltoJRy5wx5N 5XIkoWbZDzuFS/hrmF0K7jKXE3i17e2K5efETHyM= From: Alan Schmitt To: Ihor Radchenko Cc: emacs-orgmode Subject: Re: [BUG] CUSTOM_id ignored on blocks by ox-beamer In-Reply-To: <8735866czo.fsf@localhost> References: <87lemhgwn7.fsf@localhost> <8735866czo.fsf@localhost> Date: Thu, 09 Feb 2023 10:14:26 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Thu Feb 9 10:14:36 2023 +0100 (CET)) X-Org-Mail: alan.schmitt.1995@polytechnique.org Received-SPF: pass client-ip=129.104.30.34; envelope-from=SRS0=DX2w=6F=polytechnique.org=alan.schmitt@bounces.m4x.org; helo=mx1.polytechnique.org X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675934132; a=rsa-sha256; cv=none; b=FAwJkCsiGLOp6R7Hlz0MYjQRdzNqS0WsPAdG+O2aqGZs9ThzQcMp4PFJQdRCkxYck9v5kZ KL+Mf6foupoiC/1eOc2R7aNzibnrYcaZdS44aqQAqk1iZLT2Nu4Ag18G/VQhLJSq3z7akW egmd4RBPMYxtzAB2VG2LADbpkvrshou6AQx0pnrIwG0H1dK+jcaVn0KO2Wh8CMYTuzTGJO Oa2LRDmBtb6Kz458k9nEHhgl5v95/GRp+0I6cMm95AgIU3Z2I1kp/AXtiDY3Q6PUaqeqT8 CD3Wt0TFD94nDebjLkZ6hIRICe4wJ4xUNif19ExZ8fW0zxrOEXkv3y5jB3p2Rw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=polytechnique.org header.s=svoboda header.b=huQ8lLMT; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675934132; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rETLm873/Iluk9Ce1xDaBOatifUPu8SRlH1vpweolq0=; b=YTXWNV9BU2e9Qm/rx2k2t6wHtrwxl/vZ2AYF9q3ruSYDc/n6zA6lutK5aiTmAb4oBpLJdK KIidi74MD13zESvc1DHMCE+X6WqWmSY0Go5GeDeKu0yK0HoCxFPMDaEI6FS8JyOqgRovdK N/EYO76QfId2CbJ2Jrf1FlHbZUCBWvU8V8UPzwAedcPFBv+FJh+CbraJ8SF2KvZh/xHnPY SBpAuimTUbopVR+AeOqLUeKzlLFXyvcKUoEEW+fcRLL+3H37DtPj/wS9gdS748PDuR9lAw tQLkAMNpVx0vmwLjhc6G1wHUb0ywhnHnafYoJoFBW/k4k1dpKTUsV0nXVuMyqw== X-Spam-Score: -3.50 X-Migadu-Queue-Id: 73E2A36D56 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=polytechnique.org header.s=svoboda header.b=huQ8lLMT; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.50 X-TUID: y0l5YTTchnn3 --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Hello Ihor, On 2023-01-19 10:21, Ihor Radchenko writes: > Please add a changelog entry detailing the definitions where the changes > happened. See https://orgmode.org/worg/org-contribute.html#commit-messages > ... > Please document the new %l option in the docstring of > `org-beamer-environments-extra' and add a notice to etc/ORG-NEWS file. Here is an updated patch. --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE6lXof/BsSVW56ZmGBA0KO07S5ccFAmPkuXIfHGFsYW4uc2No bWl0dEBwb2x5dGVjaG5pcXVlLm9yZwAKCRAEDQo7TtLlx30QCACvyMJS/vRBjyBD pqBu4CpBLHOL327swmKH+qBjEi7o+mKdclpfd+ZS4VvOGZxzOBm8bLJyQznuJ9Im SminX0G5Bdm5veZPFfCeYsm8z8ufQYQvopw0Ju6dx0U+vFaVgeClrKN8VVkDBibI H/AL5dkQVnc1xXNO5dVx3L9V/XcJ5nfforMIG0d9rQrdySdX3+Vuit3DGirfoSXc XOQjnMnSKroDlb5JA5R0Jd2VKno/2Q3+uFILt955vc/u9nzBq+NFFRLCa4HQxSIg eNvNvDinJ8D63S8l4NNDT1SlAi5Ggr6EqbEyEGPJNcMz3HjRlRsH0zA+hZkeZyZM p+FE+srG =CPM7 -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-ox-beamer.el-add-labels-to-latex-export.patch >>From c480b26f9cb536b68b00930a19d59485f9221ef7 Mon Sep 17 00:00:00 2001 From: Alan Schmitt Date: Sun, 8 Jan 2023 17:20:31 +0100 Subject: [PATCH] lisp/ox-beamer.el: add labels to latex export * ox-beamer.el (org-beamer-environments-default): add label escape to some environments (org-beamer--format-block): generate label string for label escape (org-beamer-environments-extra): document label escape A new escape %l is available to be used in `org-beamer-environments-*' to insert the label of the current block, obtained using `org-babel--get-label' --- etc/ORG-NEWS | 5 +++++ lisp/ox-beamer.el | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index c5e9cd568..47806484e 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -79,6 +79,11 @@ document header: The face ~org-agenda-calendar-daterange~ is used to show entries with a date range in the agenda. It inherits from the default face in order to remain backward-compatible. +*** New escape in ~org-beamer-environments-extra~ for labels in Beamer export +The escape ~%l~ in ~org-beamer-environments-extra~ inserts the label +obtained from ~org-beamer--get-label~. This is added to the default +environments "theorem", "definition", "example", and "exampleblock" in +~org-beamer-environments-default~. ** New features *** ~org-metaup~ and ~org-metadown~ now act on headings in region diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 689bf1559..5df78d5a4 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -116,6 +116,7 @@ open The opening template for the environment, with the following escapes %r the raw headline text (i.e. without any processing) %H if there is headline text, that raw text in {} braces %U if there is headline text, that raw text in [] brackets + %l the label, obtained from `org-beamer--get-label' close The closing string of the environment." :group 'org-export-beamer :version "24.4" @@ -178,10 +179,10 @@ through `org-beamer-environments-extra' variable.") ("quotation" "q" "\\begin{quotation}%a %% %h" "\\end{quotation}") ("quote" "Q" "\\begin{quote}%a %% %h" "\\end{quote}") ("structureenv" "s" "\\begin{structureenv}%a %% %h" "\\end{structureenv}") - ("theorem" "t" "\\begin{theorem}%a[%h]" "\\end{theorem}") - ("definition" "d" "\\begin{definition}%a[%h]" "\\end{definition}") - ("example" "e" "\\begin{example}%a[%h]" "\\end{example}") - ("exampleblock" "E" "\\begin{exampleblock}%a{%h}" "\\end{exampleblock}") + ("theorem" "t" "\\begin{theorem}%a[%h]%l" "\\end{theorem}") + ("definition" "d" "\\begin{definition}%a[%h]%l" "\\end{definition}") + ("example" "e" "\\begin{example}%a[%h]%l" "\\end{example}") + ("exampleblock" "E" "\\begin{exampleblock}%a{%h}%l" "\\end{exampleblock}") ("proof" "p" "\\begin{proof}%a[%h]" "\\end{proof}") ("beamercolorbox" "o" "\\begin{beamercolorbox}%o{%h}" "\\end{beamercolorbox}")) "Environments triggered by properties in Beamer export. @@ -578,6 +579,7 @@ used as a communication channel." (cons "O" (or raw-options "")) (cons "h" title) (cons "r" raw-title) + (cons "l" (format "\\label{%s}" (org-beamer--get-label headline info))) (cons "H" (if (equal raw-title "") "" (format "{%s}" raw-title))) (cons "U" (if (equal raw-title "") "" -- 2.39.1 --=-=-= Content-Type: text/plain Best, Alan --=-=-=--