From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MM0HLfXIDGQZAAAASxT56A (envelope-from ) for ; Sat, 11 Mar 2023 19:31:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qLgiLPXIDGQwNgAAG6o9tA (envelope-from ) for ; Sat, 11 Mar 2023 19:31:17 +0100 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 24CFEFB80 for ; Sat, 11 Mar 2023 19:31:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pb3zU-0003I1-Pj; Sat, 11 Mar 2023 13:30:48 -0500 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 1pb3zN-0003Ek-6w for emacs-orgmode@gnu.org; Sat, 11 Mar 2023 13:30:41 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pb3zK-0003VR-TL for emacs-orgmode@gnu.org; Sat, 11 Mar 2023 13:30:40 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D0961240296 for ; Sat, 11 Mar 2023 19:30:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1678559433; bh=fqs6NMuxtfrw+TAQ3WA/8oy9yT+9w911pwyfFWwuZKc=; h=Date:Subject:To:Cc:From:From; b=n3LhnZuZq5j/RSomw8eLpP1q4S1lWMQKBsMml+l1dcYg1lV0UC4XvhXMwHer1duGo rCCn7X5U4nzDxS7lu5ENXoqFF5LMCIz02NQ+lQU25y+kTuxtL34fZE6UPQXYRYuL1Y 771iCNNKevVq+zT9s3KfEoCsRbvtOOarBhAitosPxVZxcp4aaH0dYmqO8aTOkb2ofy a7rhx6DMWR8Qb1l5l5KfDKBeN9cM1s5niKrj2tBN1OQ6JRrqSPCbibBvNUo0CPyvxk zlWch9sdcXnFd+QQdmlSz2hDd+Los51OE9kRk1hkedeOzBvcSS6en69dmvCpi5a6/V xIa+DolX4p/7g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PYs136gP5z6tsD; Sat, 11 Mar 2023 19:30:31 +0100 (CET) Message-ID: Date: Sat, 11 Mar 2023 18:30:31 +0000 MIME-Version: 1.0 Subject: Re: [BUG] Inconsistent global/local :var assignments in ob-* for lisps and non-lisps (was: org-babel guile source block bug in handling multiple values) To: Ihor Radchenko Cc: Bruno Barbier , emacs-orgmode@gnu.org, Bastien References: <9eab60bc-9b82-e037-d63b-3d879573ae32@posteo.de> <87v8jceihi.fsf@localhost> <7fc63848-d6d3-80e0-ae78-00967990813d@posteo.de> <64079614.170a0220.5a0d3.0a23@mx.google.com> <97ee254e-72d2-2bdf-e026-78bde076f1f9@posteo.de> <6408e424.5d0a0220.8862a.2a62@mx.google.com> <87v8jaoz3u.fsf@localhost> <21ea836d-8bdf-2d0d-8515-283209f2eb1f@posteo.de> <878rg3y5he.fsf@localhost> From: Zelphir Kaltstahl Content-Language: en-US In-Reply-To: <878rg3y5he.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=zelphirkaltstahl@posteo.de; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=n3LhnZuZ; 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"; dmarc=pass (policy=none) header.from=posteo.de ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678559477; a=rsa-sha256; cv=none; b=gi+jW4zPxy02qXh/+aUf+EOL/4CiSJWZ2kbPDQVIc5eEEY0wm/L10cL66UFcvq+1JpXShr hIDH6vY0k0xqTFUJH3lDifvU58cJvuy3fLt1ZYmWV0O4MXWvT9fzh+DPVu/HC6qnu0hqBk xl4OzE/Dj76RqKChyMmimOu8ka0bj/3XXePtORmFzCnSHHXksconDhvOQyVDaiB4j+95Hu 325xNNG5S9C5iS7+9DN41pNNDQfllZ88xirJPHh45TRnFNEBmS9+7p81WN0iouw3f2v7tf ZScUdSlS8FhteDWVD6zdPPm8/3fRUDTn1wPVL5YnSwGfOs6hY6vf/QlD9e5j9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678559477; 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=+YCOhUuBMPmtOyaNRp5+Nx6uGahh8u5UVQKRTjyvGXc=; b=oUjQOFcAjoT5ODSktOHhMo0TiQtk4+r0GXBbJ4wv0Cux0iEeOugMuBIMsfJ34s/aCLwXr1 a8fCjvTjvJBQN+ptnTQ4Hz4bDOiLcwcQWMIa3oIdYXOceKfsEnmLtj1OEvAcoOkK427Na/ OhtT/LCJhuZy5HPOZSplqJ4UB+KjCE49yhUo6Snle9DTI6cu4tm0TlpX4cnbqzieTOQNBK ZciuEMkUYKCrT9OlzVCiLs7a830yxPjINcpjKvubI1ZqqdK5FLFxXSEB1vH1rkAjswUVbZ fwf8twDHFDEeqxko/4HK4e9eLNR9eI3EcFNYu7NVY4pkaWdlRqbGZgyqjN0Q0w== X-Migadu-Spam-Score: -7.79 X-Spam-Score: -7.79 X-Migadu-Queue-Id: 24CFEFB80 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=n3LhnZuZ; 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"; dmarc=pass (policy=none) header.from=posteo.de X-TUID: Ao0A/2cie+bp On 3/11/23 10:58, Ihor Radchenko wrote: > Zelphir Kaltstahl writes: > >> The issue is not with defining via (define ...) inside a (let ...) in Guile. It >> is about importing macros at the time, when the body of the (let ...) is already >> evaluated, which is at a later phase than macro expansion. By wrapping inside a >> (let ...) org has moved the import to a later phase, which causes the macro >> (let-values ...) to not be expanded. > I see. > AFAIK, Elisp does not have this problem. > >> As far as I know, (defun ...) and (defvar ...) are merely defining functions and >> variables, not macros. > Same for defmacro in Elisp. > >> My point is, that imports are usually global for sessions. But :var decided for >> let-wrapping, moving them to a different place. Just like imports are usually >> global, I would expect (define ...)s to be global in the session, unless I put >> them inside a narrowed scope like a (let ...) myself. The org generated (let >> ...) is invisible to the user and thus confusing, at least for GNU Guile. >> >> For other Schemes it probably all depends on how their phases of expansion and >> evaluation work. I don't know enough about the Scheme standards, to tell, >> whether Guile has the correct behavior here or whether there is a correct >> behavior defined in the Scheme standards. Maybe someone more knowledgeable can >> chime in to comment on that. > When saying Guile I mean scheme. Remember that I am now looking from a > more general perspective of other ob-* libraries. > > My conclusion so far is that it is not safe in ob-scheme to use > let-binding. Other ob-* lisp implementations may be OK (at least, > ob-emacs-lisp is OK). > > Now, the main question is whether it is safe to use `define' in all the > scheme implementations. If it is, would you be interested in turning > your personal fix into a patch for ob-scheme? Sure! Would need to familiarize myself with with process of doing that, but why not. I guess it would be a safer bet to await, whether the patch is what the general solution should be. Or would a patch be good to have, regardless of whether the official implementation changes or not, so that others can apply it perhaps, instead of putting something in their personal init file? -- repositories: https://notabug.org/ZelphirKaltstahl