From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2DJbJitT8WU+HAEAqHPOHw:P1 (envelope-from ) for ; Wed, 13 Mar 2024 08:18:03 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2DJbJitT8WU+HAEAqHPOHw (envelope-from ) for ; Wed, 13 Mar 2024 08:18:03 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=I59bi6Kv; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710314283; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=P178j81wWTQ1nXJnN4cYoQFf/bZXaiusTsiSU71gl7g=; b=S7Zr+TsaiqcKOe1XyBvqDjksiZNjXx64o6JkdKBSzNhosDvzvVtk22x9v69IyfEw0XW73O UsXzA0C45Blhb1La//sOcD0FKYDfc0g38UW0L3hZC1YkwCHws61/YF5X73wfcxembIcPt1 QbMsUwaLBvHd/nRTx9zE6DsecQHURoDFGw4lsDchzdPAd4HWNNDzTG8SKLJq2ZhLrpNuIH 6Cwil4CBeJzE1uIpZ4MyxFc2JTWAMXcebb4WUfvkTnxfBety9lcqvGTbrUeLl/Fv/zP6zT SXwkoPv4Xgg6g4Ke4ALzJgIshu4izXMjWT+B6Exdi7S8wokdq8HJ5GfWcD5KAg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=I59bi6Kv; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710314283; a=rsa-sha256; cv=none; b=SiXedo6ahqrnh0iNTzVz1QaoSvfVvqPZGlCU5TUyEhrJvM9dI8c0wV4fcu0f39wi6v7CSK 8GAtVUR4/5TVIqceAcJ+57uORc+yuPaTnhq6DZM2epw7Zn6s+PsQe1uN4vvmOmHv75gJ36 pO9fJgUUDpoSZxqS/uXj3zZB/SljNB66Khwxn6qGr3e8Y4EWViWgwQfCP9UXRYySRhcVIK FTNLafzVqM/PzTlkJiRFpHQDW3Bq17+L7LfZeLHLLV3di2+fdJ/E2fV8NH7oVGv8j3H2qU oIDntnRELzKycuG0JkeFdpBc8oKIqptZqAD9RqYP2CtM/xQnMNqx/EbRyGCjmg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6CB255299B for ; Wed, 13 Mar 2024 08:18:00 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkIr5-0003vd-Ti; Wed, 13 Mar 2024 03:16:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkIqx-0003vL-Bl for emacs-orgmode@gnu.org; Wed, 13 Mar 2024 03:16:44 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rkIqv-0005pr-0y for emacs-orgmode@gnu.org; Wed, 13 Mar 2024 03:16:43 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-563c595f968so7980923a12.0 for ; Wed, 13 Mar 2024 00:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710314199; x=1710918999; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=P178j81wWTQ1nXJnN4cYoQFf/bZXaiusTsiSU71gl7g=; b=I59bi6KvqDeQ5lXEZNWodO2RisCKIytYyNmDEMV/31J5N473m03gaQjG9xAtwcavq2 AcKDdKwDUX+9/I3Ic84QU09G6NiRf0Ye3NMR3UaDpwAiAF/VhQO6kCSrOb70JViJSYTk CyGrqPYGZ7OvTAVeH5KOACau1yZxLPgA3eILPs0HaSIR3ofndDTQtJW6UiKLnkonfbt1 SUqWAO+eMaAxpc4EjLwTBUuNXxszPbnuzDdxbek7+vzqMxACQVB43Z3hI6OfHE/im/bS By9S0xLKnQYYn4InkQ3uQ8BCBFTW5MUa/27jKW/QnvF0IIRkWca/0fXt4RxHlrbGwO7U KTaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710314199; x=1710918999; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P178j81wWTQ1nXJnN4cYoQFf/bZXaiusTsiSU71gl7g=; b=YDQgaV3xAaYLgIfnUVu+7S7c2NkNLK/5KTdpNXMo3vqid8bVovdZYpgRN/9kjYaBr8 Sp/Euvms2e0JW8WGzow3MkjMZVKDhA0Xkv+aXRosW3vx0MLqt0Lrc5ERKdglGgiX39KS P/w+XssFuLI26XuvwaFiRU0juf7ysrwFLBTXpZptfgWkqWBzXT9qAE+mvFK6FrxrGPjm UFCzQHaFb5965hRmMR+ImzlRtBHEUZj1TLnOsHKxWl+zx/URbBPOYWs8z5PWUBbXvUGQ ufXbzo16FZVRvZM3VadJHok/6tBP42+ODpyrvsOVPRU21BJKQuzMtOhX7MCjccwm7IEm ggtQ== X-Forwarded-Encrypted: i=1; AJvYcCW0feutOaxT7ny0yFIyaz0uWGwFgFe6FOxZdZAMK9z2lKUprxGngTf2F13uHkUa6KXaIbOz1kgOnUYgH6G1q3Fl1nxwUpY= X-Gm-Message-State: AOJu0Yy3q4+1gI05KAJoVg0aKbgRNgWBSf/1wfqxMN+EJN4rsKjpy/fP j2G198DUmPbQs+BXoNAJ9N7VL5VVtvzmbshYuEC8OEwRspX92zs6XlwKNiEYFO80uSpXEzlJUiC tCw6d64PFQDLXegY6HM/oRjXQBgwfBWT0 X-Google-Smtp-Source: AGHT+IGN4FnQVaN5ObR0MaewI0wRcQVqmXilRCOzAWEpYhod+iyFeIZaiWOt+0g8+okyuG3A08F6DQLLXpyDIRUsyCg= X-Received: by 2002:a50:d542:0:b0:568:7bb3:3b18 with SMTP id f2-20020a50d542000000b005687bb33b18mr1924654edj.3.1710314198829; Wed, 13 Mar 2024 00:16:38 -0700 (PDT) MIME-Version: 1.0 References: <87ttlo6cy0.fsf@localhost> <87y1ayz1zj.fsf@localhost> <87bk7jeik8.fsf@localhost> <87plvzqjhv.fsf@t14.reltub.ca> In-Reply-To: <87plvzqjhv.fsf@t14.reltub.ca> From: Pedro Andres Aranda Gutierrez Date: Wed, 13 Mar 2024 08:16:12 +0100 Message-ID: Subject: Re: [BUG] Re: The orgframe construct in the Beamer exporter as a default needs a rethink To: Leo Butler Cc: Ihor Radchenko , Org Mode List Content-Type: multipart/alternative; boundary="000000000000469f6a0613858e95" Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=paaguti@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.07 X-Spam-Score: -8.07 X-Migadu-Queue-Id: 6CB255299B X-Migadu-Scanner: mx13.migadu.com X-TUID: nN27YSxtQy8q --000000000000469f6a0613858e95 Content-Type: text/plain; charset="UTF-8" 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 --000000000000469f6a0613858e95 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Leo,

I really don't have anythin= g to object to the original patch. I support the need to circumvent the &qu= ot;\begin-or-end{frame} inside frame" problem and using orgframe=C2=A0= is a clean way of doing so.
My only concern is the _default_ valu= e for `org-beamer-frame-environment'.=C2=A0
If we set it to &= quot;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-en= d{frame} inside frame" -> no extra stuff in file local variables AN= D 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 nece= ssary,

Cheers, /PA

On Tue, 12 Mar 2024 at 21:= 32, Leo Butler <Leo.Butler@umanitoba.ca> wrote:
On Tue, Mar 12 2024, Ihor Radchenko <yantar92@posteo.net&g= t; wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> 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&q= uot; 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, exporti= ng
> any valid Org file should work.
> The fact that the presence of \begin{frame} breaks beamer is a technic= al
> detail users should better not be bothered with. That's why we add= ed 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 bea= ntwortet 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 ru= n a leader-deposed hook here, but we can't yet

--000000000000469f6a0613858e95--