On Wed, Mar 13 2024, Ihor Radchenko wrote: > Pedro Andres Aranda Gutierrez writes: > >> 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, > > I do not like that users would need to do manual action in situation 2. > For situation 1, Leo's patch will ensure that all the frames are between > \begin{frame}..\end{frame}, but newenvironment is still generated. > > Leo, may you improve the patch to avoid defining > `org-beamer-frame-environment' when it is not used in all the frames? "all the" should be "any of" in that last sentence. -- How about the attached patch? The previous org file exports in the same way, and exporting just the final heading shows that no newenvironment is emitted. Leo