emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: "Fraga, Eric" <e.fraga@ucl.ac.uk>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: [BUG] org-beamer :BEAMER_ACT: ignored on columns
Date: Wed, 12 Oct 2022 14:00:20 +0800	[thread overview]
Message-ID: <87r0zdshsb.fsf@localhost> (raw)
In-Reply-To: <87ilksm8lo.fsf@ucl.ac.uk>

"Fraga, Eric" <e.fraga@ucl.ac.uk> writes:

> On Saturday,  8 Oct 2022 at 14:10, Ihor Radchenko wrote:
>> This patch certainly adds code duplication and might also miss some
>> scenarios considered in the environments from
>> org-beamer-environments-default.
>
> I'm not sure what code duplication you are referring to unless it's the
> two lines that now address actions and are similar to those for options.
> The comments you referenced are from the original code.

Let me elaborate.

Your patch adds for columns

         ;; also process actions
	 (raw-actions (org-element-property :BEAMER_ACT headline))
	 (actions (if raw-actions
	              (org-beamer--normalize-argument raw-actions 'action)
	            ""))

but the existing code also have

	  (let ((action (org-element-property :BEAMER_ACT headline)))

at least :BEAMER_ACT is acquired redundantly.

Further, the old code has

	     ((and (string-prefix-p "[" action)
		   (string-suffix-p "]" action))
	      (list
	       (cons "A" (org-beamer--normalize-argument action 'defaction))
	       (cons "a" "")
	       (cons "R" action)))
	     (t
	      (list (cons "a" (org-beamer--normalize-argument action 'action))

So, depending on the :BEAMER_ACT value (if it is enclosed into [xxx]),
it is parsed differently.

---

I do not know if [xxx] vs xxx makes any difference for columns, but it
is generally not very clear why there is a distinction in one case but
not another. If using (org-beamer--normalize-argument raw-actions
'action) unconditionally (rather than 'defaction or 'action) is ok, at
least it deserves a comment in the code.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2022-10-12  6:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <41d13343-d278-2474-ba8f-88d24621ab30@housseini.me>
2022-10-05  6:38 ` [BUG] org-beamer :BEAMER_ACT: ignored on columns reza
2022-10-05  8:19   ` Fraga, Eric
2022-10-06  3:06     ` Ihor Radchenko
2022-10-06  8:01       ` Fraga, Eric
2022-10-07 13:16         ` Fraga, Eric
2022-10-08  6:10           ` Ihor Radchenko
2022-10-10  7:38             ` Fraga, Eric
2022-10-12  6:00               ` Ihor Radchenko [this message]
2022-10-12  7:42                 ` Fraga, Eric
2022-10-13  2:39                   ` Ihor Radchenko
2022-10-13  8:59                     ` Fraga, Eric
2022-11-14  5:48                       ` Ihor Radchenko
2024-01-31 14:29                     ` 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=87r0zdshsb.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /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).