emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Leo Butler <Leo.Butler@umanitoba.ca>
To: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: [BUG] Re: The orgframe construct in the Beamer exporter as a default needs a rethink
Date: Fri, 1 Mar 2024 23:11:55 +0000	[thread overview]
Message-ID: <87a5nh1r9h.fsf@t14.reltub.ca> (raw)
In-Reply-To: <CF58E7A4-233D-4F9D-BBE2-FC1A67E315BD@gmail.com> (Pedro Andres Aranda Gutierrez's message of "Fri, 1 Mar 2024 12:33:32 +0100")

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

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-ox-beamer.el-fix-orgframe-environment-definitio.patch --]
[-- Type: text/x-diff; name="0001-lisp-ox-beamer.el-fix-orgframe-environment-definitio.patch", Size: 1199 bytes --]

From 4fef88ac31272a39e948fcd334bee28e444a7535 Mon Sep 17 00:00:00 2001
From: Leo Butler <leo.butler@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-FC1A67E315BD@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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: ox-beamer-bug.org --]
[-- Type: text/org; name="ox-beamer-bug.org", Size: 1030 bytes --]

#+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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: ox-beamer-bug.tex --]
[-- Type: text/x-tex; name="ox-beamer-bug.tex", Size: 1912 bytes --]

% 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 #5: ox-beamer-bug.pdf --]
[-- Type: application/pdf, Size: 27299 bytes --]

[-- Attachment #6: ATT00001.txt --]
[-- Type: text/plain, Size: 961 bytes --]



On Fri, Mar 01 2024, Pedro Andres Aranda Gutierrez <paaguti@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

  parent reply	other threads:[~2024-03-01 23:55 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
2024-03-01 23:11 ` Leo Butler [this message]
2024-03-02  6:24   ` [BUG] " 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=87a5nh1r9h.fsf@t14.reltub.ca \
    --to=leo.butler@umanitoba.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=paaguti@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).