emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
To: "Fraga, Eric" <e.fraga@ucl.ac.uk>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: The orgframe construct in the Beamer exporter as a default needs a rethink
Date: Fri, 1 Mar 2024 18:23:06 +0100	[thread overview]
Message-ID: <52D1D463-CE23-4B83-9AD9-ED889CF4ABEF@gmail.com> (raw)
In-Reply-To: <87h6hqj5we.fsf@ucl.ac.uk>

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

A possible way to preserve the feature (which has its merits in some cases) would be the patches attached.

Best, /PA


[-- Attachment #2: 0001-Don-t-create-new-environment-if-org-beamer-frame-env.patch --]
[-- Type: application/octet-stream, Size: 1184 bytes --]

From 8cbc6e8fe4581bc9856d7928c6c5b153bab7c64b Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paranda@it.uc3m.es>
Date: Fri, 1 Mar 2024 17:06:24 +0100
Subject: [PATCH 1/3] Don't create new environment if
 org-beamer-frame-environment is 'frame'

---
 lisp/ox-beamer.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 998810a28..1633191d2 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -852,8 +852,10 @@ holding export options."
      ;; Document class and packages.
      (org-latex-make-preamble info)
      ;; Define the alternative frame environment.
-     (format "\\newenvironment<>{%s}[1][]{\\begin{frame}[environment=%1$s,#1]}{\\end{frame}}\n"
-             org-beamer-frame-environment)
+     ;; Only makes sense if the name for it is not "frame"
+     (unless (string= "frame" org-beamer-frame-environment)
+       (format "\\newenvironment<>{%s}[1][]{\\begin{frame}[environment=%1$s,#1]}{\\end{frame}}\n"
+               org-beamer-frame-environment))
      ;; Insert themes.
      (let ((format-theme
 	    (lambda (prop command)
-- 
2.37.1 (Apple Git-137.1)


[-- Attachment #3: 0002-Set-default-value-of-org-beamer-frame-environment-to.patch --]
[-- Type: application/octet-stream, Size: 1718 bytes --]

From 1d7fc4b732441990c29243e59704f90cdb980176 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paranda@it.uc3m.es>
Date: Fri, 1 Mar 2024 17:51:58 +0100
Subject: [PATCH 2/3] Set default value of org-beamer-frame-environment to
 'frame'

---
 lisp/ox-beamer.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 1633191d2..171ffb61e 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -148,17 +148,18 @@ which is replaced with the subtitle."
   :package-version '(Org . "8.3")
   :type '(string :tag "Format string"))
 
-(defcustom org-beamer-frame-environment "orgframe"
+(defcustom org-beamer-frame-environment "frame"
   "Name of the alternative beamer frame environment.
-In frames marked as fragile, this environment is used in place of
-the usual frame environment.
+When customising this variable to something different
+to \"frame\", this environment is used in place of
+the usual frame environment in frames marked as fragile.
 
-This permits insertion of a beamer frame inside example blocks,
-working around beamer limitations.  See
+Customising this variable may allow insertion of a beamer frame
+inside example blocks, working around beamer limitations.  See
 https://list.orgmode.org/87a5nux3zr.fsf@t14.reltub.ca/T/#mc7221e93f138bdd56c916b194b9230d3a6c3de09
 
-This option may need to be changed when \"\\end{orgframe}\" string is
-used inside beamer slides."
+Make sure that you don't use \"\\end{<customised value>}\"
+inside beamer slides."
   :group 'org-export-beamer
   :package-version '(Org . "9.7")
   :type '(string :tag "Beamer frame")
-- 
2.37.1 (Apple Git-137.1)


[-- Attachment #4: 0003-Document-new-org-beamer-frame-environment.patch --]
[-- Type: application/octet-stream, Size: 1157 bytes --]

From ad8d9d03e527c27488a93405cb8e019834dd9d01 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paranda@it.uc3m.es>
Date: Fri, 1 Mar 2024 18:03:16 +0100
Subject: [PATCH 3/3] Document new org-beamer-frame-environment

---
 etc/ORG-NEWS | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 26f0c90f9..7c6b200bb 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -577,10 +577,12 @@ beamer bug with frame contents containing literal =\end{frame}= string
 (for example, inside example blocks).  See
 https://github.com/josephwright/beamer/issues/360
 
-The default value is =orgframe=.
+The default value is =frame=.
 
-The option should normally not be changed, except when you need to put
-=\end{orgframe}= string inside beamer frames.
+The option should changed, when you need to put
+=\end{frame}= string inside beamer frames. Make sure that
+the new name will not be used in an =\end{<new value>}=
+inside a frame either.
 
 A checker has been added to =M-x org-lint= to detect instances of
 ~org-beamer-frame-environment~ in Org documents.
-- 
2.37.1 (Apple Git-137.1)


[-- Attachment #5: Type: text/plain, Size: 1246 bytes --]



> El 1 mar 2024, a las 17:03, Fraga, Eric <e.fraga@ucl.ac.uk> escribió:
> 
> On Friday,  1 Mar 2024 at 12:33, Pedro Andres Aranda Gutierrez wrote:
>> I needed to go back to stock org-mode (as included in Emacs) because
>> the ‘orgframe’ as defined right now kills my slide decks.
>> I have been using the construct
>> 
>> ** Title
>>   :PROPERTIES:
>>   :BEAMER_act: <beamer>
>>   :END:
> 
> I do similar and hadn't realised that there had been any breaking
> changes as, I guess, I haven't had to create a new slides since the
> orgframe change came through.  This is a rather serious breaking change
> and would affect hundreds of slides for me (two modules I teach not to
> mention research talks).
> 
>> I don’t know how often the orgframe is needed (I haven’t needed it in
>> the last years of making my presentations with org-mode), but wouldn’t
>> it be more sensible to write
>> 
>> ** Title
>>   :PROPERTIES:
>>   :BEAMER_env: orgframe
>>   :END:
> 
> This sounds reasonable (to me).  I didn't follow the orgframe discussion
> closely so cannot say whether this would achieve what motivated the
> changes.
> 
> -- 
> : Eric S Fraga, with org release_9.6.19-1215-g67d937 in Emacs 30.0.50


  parent reply	other threads:[~2024-03-01 17:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 11:33 The orgframe construct in the Beamer exporter as a default needs a rethink Pedro Andres Aranda Gutierrez
2024-03-01 16:03 ` Fraga, Eric
2024-03-01 16:17   ` Pedro Andres Aranda Gutierrez
2024-03-01 17:23   ` Pedro Andres Aranda Gutierrez [this message]
2024-03-01 23:11 ` [BUG] " Leo Butler
2024-03-02  6:24   ` Pedro Andres Aranda Gutierrez
2024-03-02  6:39     ` Pedro Andres Aranda Gutierrez
2024-03-02  8:25       ` Pedro Andres Aranda Gutierrez
2024-03-02 12:22         ` Ihor Radchenko
2024-03-02 19:03           ` Pedro Andres Aranda Gutierrez
2024-03-04 11:10             ` Ihor Radchenko
2024-03-09  8:33               ` Pedro Andres Aranda Gutierrez
2024-03-12 12:33                 ` Ihor Radchenko
2024-03-12 20:32                   ` Leo Butler
2024-03-13  7:16                     ` Pedro Andres Aranda Gutierrez
2024-03-13 13:12                       ` Ihor Radchenko
2024-03-14 15:49                         ` Leo Butler
2024-03-15 14:02                           ` Ihor Radchenko
2024-03-16 13:12                             ` Leo Butler
2024-03-16 23:24                               ` Leo Butler
2024-03-17  9:53                                 ` Ihor Radchenko
2024-03-17 13:18                                   ` Leo Butler
2024-03-17 14:36                                     ` Ihor Radchenko
2024-03-02 12:21       ` Ihor Radchenko
2024-03-02 12:20   ` Ihor Radchenko

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=52D1D463-CE23-4B83-9AD9-ED889CF4ABEF@gmail.com \
    --to=paaguti@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /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).