From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id vPG7LRdvV2DqNwAA0tVLHw (envelope-from ) for ; Sun, 21 Mar 2021 16:06:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id INYXKRdvV2AQEQAAbx9fmQ (envelope-from ) for ; Sun, 21 Mar 2021 16:06:47 +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 07C2928DCA for ; Sun, 21 Mar 2021 17:06:47 +0100 (CET) Received: from localhost ([::1]:36550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO0bG-0007VI-28 for larch@yhetil.org; Sun, 21 Mar 2021 12:06:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO0Yt-0006l8-Iz for emacs-orgmode@gnu.org; Sun, 21 Mar 2021 12:04:21 -0400 Received: from out0.migadu.com ([2001:41d0:2:267::]:60671) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO0Yp-0001ts-RP for emacs-orgmode@gnu.org; Sun, 21 Mar 2021 12:04:19 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1616342652; h=from:from: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; bh=6O1hPLPuvFg8kX8h07DsiIvQf2YVnGoO5XUMPUebvaA=; b=CdEbJDo4h3Tf0aiQD2PKiI/9+95zdBnXRlvpZhyA41D3izQSgjbskVNEK+6qrAqyjtt7Jx 0DAXXydFWCgtn1cwsqw0e+GKbkr2XDe4XijsfeeNTaGtzjWPdLqYmbHG8m2QTbRkDiXKBu qFuqyDIlRPogj7h9QilBKl89UG58J3bFM/ERASDwUVyzPsw5GXI69qVEZJKPiqmW3ARHsd CJiwVMgWODJWP6RvdBZfvWCZyM9WuZ5fMhuSBprErfOQw9zW8Nz49D/zaNF9/N/ItmeONA OxFRqOKdTCOU0t4fKjTdCbzPJIFxdFbByF45f9nvS9mKsyd/4aTc6OG+UzkeAQ== From: Kyle Meyer To: Greg Minshall Subject: Re: Using lexical-binding In-Reply-To: <543601.1616218383@apollo2.minshall.org> References: <543601.1616218383@apollo2.minshall.org> Date: Sun, 21 Mar 2021 12:04:10 -0400 Message-ID: <87czvsv6h1.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=kyle@kyleam.com; helo=out0.migadu.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, 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: Marco Wahl , emacs-orgmode@gnu.org, Stefan Monnier Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616342807; 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=6O1hPLPuvFg8kX8h07DsiIvQf2YVnGoO5XUMPUebvaA=; b=YB3d19RKoz4DvUqvLLJ2C+YlCsEQiUNusPp4zPQAowItWEztLvp8bTjZgbaMQdUAN1S3yX B7s8hhUNV+/aYJwwTJC5aSR5Y98+522A+mv93HTQKXC+zrsW0xkOaNZp5iWwXcwpQAzINZ sDvfYOYqBnxrDpDEpR+Hi7yFeeCs3mDkaou3uMBNKq7rBgqBO7m06xL0I4N3Lu2tK+t/H/ 9dMEQo3h9E8VtZ6OlkX80lIjDIhsrbJ6Oy2o56JTOMgxJXTIvkVXLzlnBCxm4yBwYbnrjE gZaJI6dDbw1Ss0rpCP1hn4iANiI01+4joakH3IBEb+ovNwnrNL1iVyTSn2U9Dg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616342807; a=rsa-sha256; cv=none; b=uo6Ok/kB/CpBEaCCeKTxCT8wrmPsUWgq/4lrwXI570rO66XUWBJnJgAneFTsHUmfp4bJxX 2m4W1wIn7Vu51+XE75ldyU4MVDCna+LAd6OQeANVPZgyQxrF4k/eBhZgdNRFnMg8wrCupO 7wiygDsLSsiZn+qxWd8gARh+tF5RSc3DsbhBK0ARANhB320vMTvTTQDIFLFmUszfWbf0ab dxgXKde7xE11/wBU3ivLPw3eJgNu5xepElN/Ie9XznKxANNYT/4L8top3zEBh4L1CfF39M ZjnLarDR3yY44IDteki7IcB2P2DiJVdndc81KChvksLX+ocB5jzlCX3YqbONqw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=CdEbJDo4; 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-Migadu-Spam-Score: -2.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=CdEbJDo4; dmarc=none; 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-Migadu-Queue-Id: 07C2928DCA X-Spam-Score: -2.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: T4MiLhadPQOJ Greg Minshall writes: > Kyle, > > thanks. i see. i wondered why the talk was all about agendas. > > since, in my (brand new, experimenting) use of > =org-babel-map-src-blocks=, i'm calling a function, and that function is > trying to de-reference, e.g., =beg-block=, i get an error. Thanks for the details. > it is (or does seem to be) the case that if the macro included all the > valueless =defvars=, a function called from it has access to all those. > i don't know if this would be a useful modification. Hmm, given that the lexical-binding change to ob-core was back in Org 9.0 (November 2016), it seems like dynamic scoping wasn't really being relied on (or, if it was, downstream code has already been adjusted). In my view it'd be better to stick with lexical scoping for these variables, with callers explicitly passing the subset of needed variables to the underlying function(s).