From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mBDhL7JQDGRv6QAASxT56A (envelope-from ) for ; Sat, 11 Mar 2023 10:58:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kFjxL7JQDGTUgAAA9RJhRA (envelope-from ) for ; Sat, 11 Mar 2023 10:58:10 +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 40032EC76 for ; Sat, 11 Mar 2023 10:58:10 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=cDW2n5Ml; dmarc=pass (policy=none) header.from=posteo.net; 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=1678528690; 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=G6qTnWOTnuu+v8xPO/g9P93FKNqZlvK+1vIw0aMM6vg=; b=Wxf2kQk6o29KV+8r6SfORqsQypZ/OChgjA7iXlh+93dqorEczszm7aaMw/WcK3Ay2GTIFE xW/TFyXbiH0w8oRN2TEMpG2DOvv2Shcf6pmyZJ3LSoZ1Fb6iVJHj9buiEm5gZY1Cm4lGlI JajDLPnO9d/VVJJkrR+VGmZ07Mdvx/8M0iu9IJPwIsomL7rjVeEakSBVdXsJAnDqNvwWZh 1Jp2I19V3XOLz1jzwoVtIGr6R512gE3MxkU7qoTBXcecPv/OUrs8E8T7E1NA07KO2oe8pt XwJsxiB/SqJmGzc2F67CZ7j+io1uipPesx3diC8UM4pPFfOLI2IkTTuUHYnkvw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=cDW2n5Ml; dmarc=pass (policy=none) header.from=posteo.net; 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-Seal: i=1; s=key1; d=yhetil.org; t=1678528690; a=rsa-sha256; cv=none; b=Ob7bziVJaiO/c1WChPDyhbafrtH75KV6q+5G0isGcCFlZgm0oyfhBGGF3QYmQ2G2SitWbg 88G21mFf3dmIs0OVZ3zSjdqiydFJmZFInF/u/U/c5MtAEQT+78x9G/nZSRcplKRIWbW61W l8FlKwSwiQqUez020f81fyfNYAqIiL1ZV5X2ZK1CTT2PJN6XdF19SAFSP0ne2kGIJbmgHG h3zofvymtLV2/Js9N7HsoEssfd0ENLezKTJYlCHPWoiqwqFsk4diHohxUdcfO0LEDZfLNg 55kTFDrBqgz94sG4HmhP2hdVEhABiyLfDZnVuQaEY7uAqg0RE8zAIjVZNp2i5g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pavyO-0008Rq-4Y; Sat, 11 Mar 2023 04:57:08 -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 1pavyJ-0008RL-41 for emacs-orgmode@gnu.org; Sat, 11 Mar 2023 04:57:04 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pavyH-0000U5-GY for emacs-orgmode@gnu.org; Sat, 11 Mar 2023 04:57:02 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8E1612402BA for ; Sat, 11 Mar 2023 10:56:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1678528619; bh=oKjeZYlffsyLyfTOsDsXbVhiTZOB0+Mwpd8mrjcRWjg=; h=From:To:Cc:Subject:Date:From; b=cDW2n5MlXo+iJb5A0bxnM5ock5DYaQH0vcGIoJgXl+6xcOx7hTmQXdWzd5mUiwoKs p+4Y9oyEJQv/RjzKc3MhttPtN46WGo8JUHW5dvfycpVbCp1zVUkIJ4FqZGvkPrqX2w hetUk5/84W5aSDDT9A08dhEkj7jbyMXjmW1UqWHoXRUR8/4GG+IwxYXP6Fm/rUzOph RJzTJh+veJSaR+4WhtK1K97gbEEkAiYFHl60GKGMPTJ6wJjw0MJeFJicSRVcKPfSjM fncSt8sqq85NPp5e/BpmiHb7JHDnsRndxVSnPIN3oczvySEgoWe8AzwQyByHDmIrU5 A9rczPH2J3qUA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PYdcQ0zCzz9rxG; Sat, 11 Mar 2023 10:56:54 +0100 (CET) From: Ihor Radchenko To: Zelphir Kaltstahl Cc: Bruno Barbier , emacs-orgmode@gnu.org, Bastien 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) In-Reply-To: <21ea836d-8bdf-2d0d-8515-283209f2eb1f@posteo.de> 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> Date: Sat, 11 Mar 2023 09:58:21 +0000 Message-ID: <878rg3y5he.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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: X-Migadu-Queue-Id: 40032EC76 X-Spam-Score: -11.20 X-Migadu-Spam-Score: -11.20 X-Migadu-Scanner: scn0.migadu.com 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-TUID: ADcIpinlmTCq 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? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at