From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OJ35KzsCpGIKxAAAbAwnHQ (envelope-from ) for ; Sat, 11 Jun 2022 04:47:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gIDnKzsCpGJmMAAA9RJhRA (envelope-from ) for ; Sat, 11 Jun 2022 04:47:23 +0200 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 34F9C2C940 for ; Sat, 11 Jun 2022 04:47:23 +0200 (CEST) Received: from localhost ([::1]:57204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzr9l-0003qA-CI for larch@yhetil.org; Fri, 10 Jun 2022 22:47:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzr9H-0003q1-Rb for emacs-orgmode@gnu.org; Fri, 10 Jun 2022 22:46:51 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:45989) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzr9G-0001iN-BB for emacs-orgmode@gnu.org; Fri, 10 Jun 2022 22:46:51 -0400 Received: by mail-pj1-x102c.google.com with SMTP id t3-20020a17090a510300b001ea87ef9a3dso988638pjh.4 for ; Fri, 10 Jun 2022 19:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=Y7rKuZEgtMFAI0PcybaVdlLe6Cg2eI2pw1aNu0XwTkI=; b=MI3bCrFEvWqh3jcaJtI/jKoT4JZI42KiNy4inD85D2lKiGhRFoubltRWEn9Zxkd/3/ zpg7v1/k39E7PFj3XViQ/sz9bOSr3c3OJOQwh+n0FLuCBNM1YJ0gUOiQiSKghH+DpfYG w4qozOWX5ojGuOTsooRxNktqICSQmsyGz+3k+qsKQn/rlTObQ6uq1i7QkGDVRP4F//8d BTuvJSz8VPHEGhhcHEY6QSp2T6D/MIrAqx99JkntfZl5+LlGD+ooytWG8bLEGyNIOEx/ abJRDd5HDiBesYk6sWResALnygftsKrYUoEA0xcr680pepa7SnaQKE+zNEtnrsvPq3Wm jFyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=Y7rKuZEgtMFAI0PcybaVdlLe6Cg2eI2pw1aNu0XwTkI=; b=cEHr4Vrhz+CmBQUvSAgr04ASRJE5fbiD/+30PeWT+hHh8LqOYSVLLkT+OqHTJkmT8U q3g0AGz5b+31xICHJ4t0yhvxQJyPPjdYEV+Z3UCybl4oKpWEC8pPZworaPQ3O8+PVkq7 H+E08o0A0vyTh757c6GrGOozoif28OXyN3we/ixx2CAcOkCEj0fMxPPv63E6sjgK4mMm 4krmUM82pp+Epg9JvaT+THFIVVCmF75at6tYc8CLMfiTFx1rhJRiWFjMHjCBFLe+mRVV JPB7M43J6eck2Aw/9ASZYVgjdGrM8VY176AT/flo/JjTP3EWdh0VJ+R++/euLTS3up/3 PrGw== X-Gm-Message-State: AOAM530SYyyvrcymk0IRgH17atd6Ny1IEx2O0r7m4oRp7Cj90C+h3MLa i2q2xi5inJZOq2dCRGe6lCc= X-Google-Smtp-Source: ABdhPJybuIbLDwpVwcAlqk77diNuklrCw5/zTY4NoKJVu4Qax+qhX9QPAzlENundsOeVHu5OO6QCag== X-Received: by 2002:a17:903:41d0:b0:167:68a7:c31 with SMTP id u16-20020a17090341d000b0016768a70c31mr34477846ple.49.1654915608775; Fri, 10 Jun 2022 19:46:48 -0700 (PDT) Received: from localhost ([64.32.23.62]) by smtp.gmail.com with ESMTPSA id o2-20020a170903300200b001663e1881ecsm394610pla.306.2022.06.10.19.46.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 19:46:47 -0700 (PDT) From: Ihor Radchenko To: Matt Huszagh Cc: "emacs-orgmode@gnu.org" Subject: Re: [PATCH] Fix behavior of lambda default header arg vars In-Reply-To: <87ee03je2m.fsf@gmail.com> References: <87o87abjm5.fsf@gmail.com> <87ee035mnp.fsf@localhost> <87ee03je2m.fsf@gmail.com> Date: Sat, 11 Jun 2022 10:47:27 +0800 Message-ID: <87wndnq5kw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654915643; 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=Y7rKuZEgtMFAI0PcybaVdlLe6Cg2eI2pw1aNu0XwTkI=; b=nsgyG8Ujwl2j6r01muWsXZ6cVnX1pZ3s1NyT+AXT2XYXx1aXnjFNrx3xfQor2+WQ3L3vsn an8+qkXWydS4sBq5eMG3n2APqMGzIdrq2ViSJqGC4wxd/nhMsgNokxZ9p6jHqCTi6+ruy5 IZtMknqJz6vyqIASaZI9JHFnZVbLFAcd16MPnAEIAdPW4U9+IJT/yz92gmY5z2kWFXbjvG mewOSqq+AxS8klSlncQzNAC38fUAYC7GcPD3JIJLhxjtuvwc6gOX8XqWGJCcybvGhwin7N TwjgwYdir0MkI721LLtaK+5aLUFpyeE/tevxAUSVtCzivqjzgNGg6Iqmu9X4ZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654915643; a=rsa-sha256; cv=none; b=RHR2bbyUsj7qJmJrpMLRFV3w3g290Jeg9vxgBoXu9gaw/qoqymeFavok7yLbKGie0pDXiT NDJ2GFGgfWaY3TIsyFUBvWd7U6HT/dnhPwNmYjO8mY2+KexgvixoaGbT1XIg5W54gL/jNI v60VduTZaLYvrphyKqcK3+cbSrpq8duru2S/fePADiBoDJXpX2QzWWddXkDdtnFNtNK3rp yt63ub6KHTHwrBSO7xMZXUdMHqqC4AHvQqohwf9OfGAMVegV9mf1mEFEEnwf8qeWrfmImI SErHiph3egC4tUoRT6eDnLUHscTxYfsx7A/Cc16JvPvJoFkayK/3stqV+j9lDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MI3bCrFE; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -4.98 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MI3bCrFE; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: 34F9C2C940 X-Spam-Score: -4.98 X-Migadu-Scanner: scn0.migadu.com X-TUID: cnvFHplQycdP Matt Huszagh writes: >> It would help if closure part and multi-variable part were split into >> separate paragraphs. > > The closure part and muliple header argument part are already in > separate paragraphs. The multiple header argument part, however, is > incorporated into an introductory paragraph that very briefly describes > the value syntax of org-babel-default-header-args and the types of alist > values it supports. I did this because that introductory information is > short and simple and so I felt it acceptable to incorporate the multiple > header argument information. I don't feel this places a significant > intellectual burden on the reader to follow, but I'm happy to insert a > newline before "Some header arguments..." if you'd prefer. Yes, please. And also move the multiple header arg parts below the closure example. >> Are you saying that _only some_ backends support multiple vars? Are >> there backends that do not support? > > I think you're confused about "(e.g., :var for some language backends)": > > It's been a while since I created this patch and I don't remember > exactly why I wrote it this way. I think it was based on the belief that > not all language backends support variable passing in header arguments, > though I honestly couldn't tell you at the moment whether this is > true. In that vein, a semantically equivalent way to write this would be > "(e.g., :var for language backends that support it)". Maybe all language > backends support variable header arguments, in which case "(e.g., :var)" > could be used here instead. In any case, the "some language backends" > part of the phrase is not a qualification of "multiple", but of > "variables". Nor is it correct to read it this way, as the statement is > grammatically clear and correct. An equivalent statement would be: > > """ > Some header arguments can be provided multiple times for a source > block. An example of such a header argument is :var. > """ This looks slightly better. Though after reading your reply and reviewing the docstring, I realize that my confusion partially came from the fact that your patch is about closures, while the docstring change is not. Could you split that patch in two parts: one for the docstring change and one for the :var parameter handling? >> Also, the example is not helpful here. > > The example *is* helpful. It provides explicit direction for how to > handle the non-obvious case of header arguments that can be passed > multiple times, which isn't described much in the documentation. Agree. See my above explanation about the source of confusion. Best, Ihor