From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YB56G/DeU19wYwAA0tVLHw (envelope-from ) for ; Sat, 05 Sep 2020 18:54:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6NtMF/DeU19XYQAA1q6Kng (envelope-from ) for ; Sat, 05 Sep 2020 18:54:40 +0000 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 D75B79403EE for ; Sat, 5 Sep 2020 18:54:39 +0000 (UTC) Received: from localhost ([::1]:48720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEdKe-0005GP-Ed for larch@yhetil.org; Sat, 05 Sep 2020 14:54:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEdKF-0005G1-Do for emacs-orgmode@gnu.org; Sat, 05 Sep 2020 14:54:11 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:41281) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEdKD-0000Sl-Oo; Sat, 05 Sep 2020 14:54:11 -0400 Received: by mail-wr1-x436.google.com with SMTP id w5so10642289wrp.8; Sat, 05 Sep 2020 11:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LSWg2ki9kzzWcF3HRFWQgSD6HQ8YWrJfpFZsAn25ZRE=; b=DrvN2S4vyqPcvMrQsj4an9G4T2hK1RtWoftyb4GeeCkWQM5N/OgQs6dFyZbWXceYch GlVcKUr85gGn+7QuXlqfktkP6OoOoHgFYfK4iwKtZjPvry9od84Br7uJostqt98f2BIb 0JxOIXA/oSSRygMm22nAlqgAuGXPAzy/V0jL2QckoQdITgS9eM7jmOWv0JzGJJeTAtP+ eXjpQ+qE9n0XCKWQhjQ891xD2juZQp7FXxHN2Lkp5+OxGWRTiSwPxLdUuwOpLpQ8RQg2 LpbUbmirn1UCFQ57He/FhF6sseZh+V9mYSjsPLJL0OhPERC2n+fnrbKwIyUD6DlIZGyb yZWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LSWg2ki9kzzWcF3HRFWQgSD6HQ8YWrJfpFZsAn25ZRE=; b=MUA6kSeq3mpEPelNc4sGSwpNDJI+cPG9zh26qhiNEE+cAQg+d669jniAFbrF/mgzx/ JunBMk5wq+nJJER/FwRf9H/qi/oJlP/Vj2br3Z+UATOjkmDkw+wPAOn4AqANAWNpi/BQ KWzbo+6LOqwWyKgMnYFDT0qGNAmmHCgykkUGx3LqQhRzESCB3Rer/aQjLqFPcNk6qDm+ /Iy3QNDmDANr+x83a7Iis9iOs8se2Mg6V1OsdWInqSik06tcokbAJh4J6E9nhpah9qdm gJRPFmNhzVmBXd5roegerpW+OWnGvtMhUUvdyHe7yf77CAMWOrJIHadn1VgTrER8nbDg a0EA== X-Gm-Message-State: AOAM530oEzH69GeVS9wjNS+MynkLGOhXAdVkIq6kFaAXrW6pGJT23ppG 5/djq3DJOjasem6iY1FwMVhT557jWS5bvzMOPF0fUbvz X-Google-Smtp-Source: ABdhPJz080/+8By6yAHk7qvIvfLYFV/9qPs9PROHP+xNi6d05d8jzNg3rmxsB+zVknj8ERSvV4UF37uLpboD+g7PDls= X-Received: by 2002:adf:f492:: with SMTP id l18mr14130162wro.280.1599332047641; Sat, 05 Sep 2020 11:54:07 -0700 (PDT) MIME-Version: 1.0 References: <87ftflikkc.fsf@gmail.com> <871rjqprdu.fsf@gmail.com> <875z8wxis3.fsf@gmail.com> <87k0x8dy3s.fsf@gnu.org> In-Reply-To: <87k0x8dy3s.fsf@gnu.org> From: Tom Gillespie Date: Sat, 5 Sep 2020 11:53:56 -0700 Message-ID: Subject: Re: babel default header args as functions To: Bastien Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x436.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Huszagh , "emacs-orgmode@gnu.org" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=DrvN2S4v; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: tfOWJTf8E8ax 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