Hello,

Thanks for the bug report. The definition of the orgframe environment
did not pass the overlay spec to the underlying frame environment. I
believe the attached patch fixes that.

Attached is an org file that appears to exercise the patch and show that
it is doing the right thing. Could you confirm this, please?

----
Incidentally, I did propose that we introduce a BEAMER_FRAME property so
that it could be manually set, but Ihor did not like that idea so it got
scrapped.

Thanks,
Leo

From 4fef88ac31272a39e948fcd334bee28e444a7535 Mon Sep 17 00:00:00 2001
From: Leo Butler <leo.but...@umanitoba.ca>
Date: Fri, 1 Mar 2024 17:06:57 -0600
Subject: [PATCH] lisp/ox-beamer.el: fix orgframe environment definition

* (org-beamer-template):  pass the frame overlay specification to the
frame in the definition of the orgframe environment.

Bug reported by Pedro Andres Aranda Gutierrez.

Ref: https://list.orgmode.org/orgmode/cf58e7a4-233d-4f9d-bbe2-fc1a67e31...@gmail.com/T/
---
 lisp/ox-beamer.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 998810a28..56e7e06ed 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -852,7 +852,7 @@ 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"
+     (format "\\newenvironment<>{%s}[1][]{\\begin{frame}#2[environment=%1$s,#1]}{\\end{frame}}\n"
              org-beamer-frame-environment)
      ;; Insert themes.
      (let ((format-theme
-- 
2.43.0

#+STARTUP: beamer

* Slide A
:PROPERTIES:
:BEAMER_act: <beamer>
:END:

I use
#+begin_example
:PROPERTIES:
:BEAMER_act: <beamer>
:END:
#+end_example

For slides I only want in the presentation and

* Handout
:PROPERTIES:
:BEAMER_act: <handout>
:END:

For slides I only want in the handout. With the new orgframe
environment as of now, the argument between the <> is not passed to
the frame and therefore lost.

* Slide B
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
#+begin_example
:PROPERTIES:
:BEAMER_env: orgframe
:END:
#+end_example
When you really do need it?

* Slide C
:PROPERTIES:
:BEAMER_act: <beamer>
:END:

This slide is included, too.

* Handout
:PROPERTIES:
:BEAMER_act: <handout>
:END:

This frame is exported as an =orgframe= with the correct =BEAMER_act=:

#+begin_example
:PROPERTIES:
:BEAMER_act: <handout>
:END:
#+end_example
% Created 2024-03-01 Fri 17:06
% Intended LaTeX compiler: pdflatex
\documentclass[presentation]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\newenvironment<>{orgframe}[1][]{\begin{frame}#2[environment=orgframe,#1]}{\end{frame}}
\usetheme{default}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 29.1 (Org mode 9.7-pre)}, 
 pdflang={English}}
\begin{document}

\begin{frame}{Outline}
\tableofcontents
\end{frame}

\begin{orgframe}<beamer>[label={sec:org0d8497b},fragile]{Slide A}
 I use
\begin{verbatim}
:PROPERTIES:
:BEAMER_act: <beamer>
:END:
\end{verbatim}

For slides I only want in the presentation and
\end{orgframe}
\begin{frame}<handout>[label={sec:org50260e7}]{Handout}
For slides I only want in the handout. With the new orgframe
environment as of now, the argument between the <> is not passed to
the frame and therefore lost.
\end{frame}
\begin{orgframe}[label={sec:org79072fa},fragile]{Slide B}
 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
\begin{verbatim}
:PROPERTIES:
:BEAMER_env: orgframe
:END:
\end{verbatim}
When you really do need it?
\end{orgframe}
\begin{frame}<beamer>[label={sec:org3036752}]{Slide C}
This slide is included, too.
\end{frame}
\begin{orgframe}<handout>[label={sec:org3be6ccc},fragile]{Handout}
 This frame is exported as an \texttt{orgframe} with the correct \texttt{BEAMER\_act}:

\begin{verbatim}
:PROPERTIES:
:BEAMER_act: <handout>
:END:
\end{verbatim}
\end{orgframe}
\end{document}

Attachment: ox-beamer-bug.pdf
Description: ox-beamer-bug.pdf


On Fri, Mar 01 2024, Pedro Andres Aranda Gutierrez <paag...@gmail.com> wrote:

> Hi,
>
> 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:
>
> For slides I only want in the presentation and
>
> ** Title
>    :PROPERTIES:
>    :BEAMER_act: <handout>
>    :END:
>
> For slides I only want in the handout. With the new orgframe
> environment as of now, the argument between the <> is not passed to
> the frame and therefore lost.
>
> 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:
>
> When you really do need it?
>
> Just asking… /PA

Reply via email to