From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 4NBWAuM08Wb+9QAA62LTzQ:P1 (envelope-from ) for ; Mon, 23 Sep 2024 09:29:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 4NBWAuM08Wb+9QAA62LTzQ (envelope-from ) for ; Mon, 23 Sep 2024 11:29:07 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=umich.edu header.s=relay-1 header.b=WP0j9Eud; dmarc=pass (policy=none) header.from=umich.edu; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727083746; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Xaam/c2Mu3g2aMqptABsciWRN99FSvLY5m9GwX+KJ5E=; b=cDYJbUMUW4WtHVNjGnMzbP9wKDgzVJ3K8vyXH3yOCoDezR4uW6hI/TX7HOk+dmHdzft/GI 7hLLofOBRtpIy4IOAmsu6cOl+yfSMV8jasBwmcEyWDtX8bJfkZZjumJ56Sw7Arioc2jPh8 4zmAIHEp3Z5/dm+cDuGCNmyN+xbxNrMQrfZzgaZl/RpXZ24AbeTG1QKazesGaz9yV9J1uh nFu1IOze9dRPhjKdIB01tl9MEOepXRMLZ0WdBJHdQvBLUcpBuuAQME0TM+zwq7/01PDCOI JFV+7YZ0VKZ2uTVX2O9XGApYZhd1WEgstqTtR68kkeOF4XA/C8cVGcOPjk7q8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727083746; a=rsa-sha256; cv=none; b=VbeDNIwiNipHmh1eQKgpLk0N7hTJ1Ow4N84TApGJU4Nc4Gn4PbMr1nKjHOcbIH32ERdkSK TkZJfqNOmkwPNwVKbBKPpDWboXAJ3uPPhws89Vp/XIyfOUdTTJYPtQa14m52ma8QO8Mybb NN8k4CcrTtYqlqfd75jLASoepNGWxCQ/O7JeUBxjn5rJqWBEVNMxWXAt57/ZnV5PfPaV/P 7yWnAMGcPeHqD8EN/NuDy5ibOZVL+FMqqFIn7xWwkIjfj1W65dV4zn5tLqZNfUsR9/3A/w Y0oOd4u8equGLPZX98A6GqBm2g0oGILp7/bR11I9mArOeUqJrjDNRvDgv4MmMw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=umich.edu header.s=relay-1 header.b=WP0j9Eud; dmarc=pass (policy=none) header.from=umich.edu; 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" 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 78A55BCEE for ; Mon, 23 Sep 2024 11:29:04 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssfMi-0000lZ-7i; Mon, 23 Sep 2024 05:28:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssfMf-0000lM-GF for emacs-orgmode@gnu.org; Mon, 23 Sep 2024 05:28:17 -0400 Received: from relay-egress-host.us-east-2.a.mail.umich.edu ([18.216.144.57] helo=pumpkin-llyr.relay-egress.a.mail.umich.edu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1ssfMb-0006eo-K9 for emacs-orgmode@gnu.org; Mon, 23 Sep 2024 05:28:16 -0400 Received: from safe-cyclops.authn-relay.a.mail.umich.edu (ip-10-0-74-144.us-east-2.compute.internal [10.0.74.144]) by pumpkin-llyr.relay-egress.a.mail.umich.edu with ESMTPS id 66F134A8.300B1C60.1DB42517.215367; Mon, 23 Sep 2024 05:28:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=relay-1; t=1727083688; bh=Xaam/c2Mu3g2aMqptABsciWRN99FSvLY5m9GwX+KJ5E=; h=To:cc:From:Subject:In-reply-to:References:Date; b=WP0j9Eudu+TQElingFzTBRjfowk+5V06k3ew+TdZUozuWR8hYv3pUMowQkZRJhKyr xIeR70+5FnDKYwAXAFsazurAqjETKVl3Jlwu4oznuymFsVKP1+kk3YpE9Gi2poOET4 VKdC0i5o0t/XgZRysPll8MY3WWCHjOCVewQVD+4+Yy3yhq3gNwPZtzZ2FJqRznn9EV N3B7pD8ug4zKbnJ/dhuNjooT9+fxA3DV5O1pAT4eUh7BSh83yAULBbkGBosc+H0FMY d4fa0Eemd6jGpMKT1/2ioMvu4IjG24Mh/4AKsVVr6+PylIdnTcsn9rnx1w/dNcNqDX yUq+8MgzN4pfA== Received: from localhost (Mismatch [85.108.128.133]) by safe-cyclops.authn-relay.a.mail.umich.edu with ESMTPSA id 66F134A7.1B4A8897.1E0E92A7.826870; Mon, 23 Sep 2024 05:28:08 -0400 To: Ihor Radchenko cc: emacs-orgmode@gnu.org From: Greg Minshall Subject: Re: WORG commit o-c/b/l/ob-doc-elisp.org: add new section on tangling and :var In-reply-to: <87r09bpr81.fsf@localhost> References: <87r09bpr81.fsf@localhost> Comments: In-reply-to Ihor Radchenko message dated "Sun, 22 Sep 2024 16:50:54 +0000." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 31.0.50 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <287373.1727083681.1@archlinux> Content-Transfer-Encoding: quoted-printable Date: Mon, 23 Sep 2024 12:28:01 +0300 Message-ID: <287374.1727083681@archlinux> Received-SPF: pass client-ip=18.216.144.57; envelope-from=minshall@umich.edu; helo=pumpkin-llyr.relay-egress.a.mail.umich.edu X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 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, GAPPY_SUBJECT=0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -7.31 X-Spam-Score: -7.31 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Queue-Id: 78A55BCEE X-TUID: N5D1HGNf6cek hi, Ihor, thanks for looking at my changes and for your e-mail. i agree that the write-up is maybe a bit blog-post'y; i'm agnostic as to whether it should be on that worg page or not. if anyone has some other place to put it (on their own blog, where ever), feel free. my memory is that of the two issues i mention, i see the lexical binding as being a deficiency in org-mode tangle of elisp source code. i.e., if the header argument =3D:lexical=3D is set to =3Dyes=3D, then the tangling process *should* insert the appropriate line: ---- ;;; ... -*- lexical-binding: t -*- ---- as the first line of the tangled file. and, that *not* doing so is a deficiency. or, at least it should do so in the case there are any =3D:var=3D that are passed (which result in wrapping the user's code in a let binding). (i'd probably opt for always doing it, when =3D:lexical=3D = is appropriately set; but that could also have some backwards compatibility issues.) the other issue, which i guess resonates with the mailing list from last year you pointed me at ---- https://list.orgmode.org/orgmode/9eab60bc-9b82-e037-d63b-3d879573ae32@post= eo.de/ ---- where there are problems because =3D(require...)=3D (=3D(import...)=3D for= that discussion, i think?) is not at the top level of the tangled source file is harder, i would guess. as the discussion pointed out, for elisp, we evaluate the code in the currently running Emacs process. (namespaces, namespaces, namespaces...) am i right, though, that in the *absence* of a =3D:var=3D, any =3Ddefun=3D= , =3Ddefvar=3D, maybe any globally-scoped =3Dsetq=3D, are all polluting ("enhancing" should you prefer) the global name space? ---- #+begin_src elisp (setq fubart 33) (defvar fubary "and then left") (defun fubar () (message "%d-year old kilroy was here (%s)" fubart fubar= y)) #+end_src ---- so, maybe the =3D:var=3D doesn't add that much (to an already-dubious situation; sometimes you want that, sometimes you don't). (the fact that this only increases the "problem" "slightly" reminds one of the straw that broke the camel's back. :) as someone -- you? -- often says, WDYT? again, thanks. cheers, Greg