Hi Leo, I really don't have anything to object to the original patch. I support the need to circumvent the "\begin-or-end{frame} inside frame" problem and using orgframe is a clean way of doing so. My only concern is the _default_ value for `org-beamer-frame-environment'. If we set it to "frame", we only need to customise it in the file local variables in files where it needs to be changed and we catch all flies in a stroke: Situation 1: presentation has no "\begin-or-end{frame} inside frame" -> no extra stuff in file local variables AND newenvironment is not generated AND frames are between \begin{frame} and \end{frame} Situation 2: presentation needs to circumvent "\begin-or-end{frame} inside frame" -> set local variable in file AND newenvironment is generated AND frame is changed where it is strictly necessary, Cheers, /PA On Tue, 12 Mar 2024 at 21:32, Leo Butler wrote: > On Tue, Mar 12 2024, Ihor Radchenko wrote: > > > Pedro Andres Aranda Gutierrez writes: > > > >> Jup, of course. If you look in org-lint.el, one of the cases that would > >> trigger a message is when the frame environment uses "frame" directly > and > >> there is a \begin{frame} in the org. > >> Line 1522 onwards in org-lint.el > > > > (1) > > Sure, but we should not demand users to run org-lint. Ideally, exporting > > any valid Org file should work. > > The fact that the presence of \begin{frame} breaks beamer is a technical > > detail users should better not be bothered with. That's why we added the > > orgframe construct. > > > > (2) > > On the other hand, it is clear that Org mode users are unwilling to > > tolerate too much of machine generated latex output. So, going further > > and trying to generate unique orgframe environments might not be ideal. > > > > The current approach is a balance between the above considerations. > > > > AFAIU, what you propose is reverting the orgframe code; that goes > > against the first point. > > Current git HEAD allows a user like Pedro to effectively turn off the > orgframe code via > > (setq org-beamer-frame-environment "frame") > > or an equivalent. > > > > > What I proposed is to reduce the amount of machine-generated code by > > using `org-beamer-frame-environment' only when strictly necessary. > > Attached is a patch that limits the use of > `org-beamer-frame-environment' to those frames that contain either > \begin{frame} or \end{frame} in their body. > > This has the nice side-effect that one can include example frames > generated by Org without causing an error (previously, Org exported > latex that would not compile). See the attachments. > > Leo > > -- Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet