emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tom Gillespie <tgbugs@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Matt Huszagh <huszaghmatt@gmail.com>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: babel default header args as functions
Date: Sat, 5 Sep 2020 11:53:56 -0700	[thread overview]
Message-ID: <CA+G3_PMnEk3DUWaX0Yp3q_SUaveCRALbiqwGNSvzjHA-uSEtOg@mail.gmail.com> (raw)
In-Reply-To: <87k0x8dy3s.fsf@gnu.org>

I think making the behavior of default arguments consistent with
regular arguments is probably a good thing. I have a number of use
cases that I can imagine would benefit greatly from being able to
define a :header-args: :header (lambda () "yay!") property as a
closure (and actually I assumed that it would just work that way if I
tried to do it, clearly not though). I can't tell for sure if the
patch enables this behavior though or whether I would still get a
Wrong type argument error. I don't see any additional security
implications beyond those already present (or not present) from
allowing closures as arguments to header arguments generally. Looking
at the patch it seems that it preserves the behavior of performing the
evaluation of the closures at the source block, but I'm not 100% sure.
If the default header closures are being evaluated before checking
whether they have been superseded by the headers on a block then that
is incorrect and they should not be evaluated until it is clear that
they are the value of the header for that block and have not been
superseded.
Best!
Tom


  reply	other threads:[~2020-09-05 18:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-08  7:50 Matt Huszagh
2020-08-28 18:17 ` Matt Huszagh
2020-09-02 16:09   ` Matt Huszagh
2020-09-05 15:47     ` Bastien
2020-09-05 18:53       ` Tom Gillespie [this message]
2020-09-05 19:11         ` Huszaghmatt
2020-09-06  5:00         ` Bastien
2020-09-06  9:25           ` Tom Gillespie
2020-09-09 19:06         ` Matt Huszagh
2020-09-09 19:33           ` Tom Gillespie
2020-10-14 10:31             ` rey-coyrehourcq
2020-10-14 14:16               ` Matt Huszagh
2020-10-14 14:29                 ` rey-coyrehourcq
2020-10-15  3:38                   ` Matt Huszagh
2020-09-06  2:10       ` stardiviner
2020-09-09 19:20       ` Matt Huszagh
2020-12-22  7:08         ` Matt Huszagh
2021-09-26  8:14     ` Bastien
2021-09-29  0:37       ` Matt Huszagh
2021-09-29  1:30         ` Matt Huszagh
2021-09-29  1:45           ` Matt Huszagh
2021-09-29  4:04           ` Timothy
2021-09-29  4:53             ` Matt Huszagh
2021-09-29  7:28           ` Bastien

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=CA+G3_PMnEk3DUWaX0Yp3q_SUaveCRALbiqwGNSvzjHA-uSEtOg@mail.gmail.com \
    --to=tgbugs@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=huszaghmatt@gmail.com \
    --subject='Re: babel default header args as functions' \
    /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

Code repositories for project(s) associated with this 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).