From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 gIDEHLvaCWT7DwEASxT56A (envelope-from ) for ; Thu, 09 Mar 2023 14:10:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GN9BHLvaCWQlRwEAauVa8A (envelope-from ) for ; Thu, 09 Mar 2023 14:10:19 +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 3439A9EA2 for ; Thu, 9 Mar 2023 14:10:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paG1V-00055P-N2; Thu, 09 Mar 2023 08:09:33 -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 1paG1U-00055F-1o for emacs-orgmode@gnu.org; Thu, 09 Mar 2023 08:09:32 -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 1paG1R-0007eG-MP for emacs-orgmode@gnu.org; Thu, 09 Mar 2023 08:09:31 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 44C4B240335 for ; Thu, 9 Mar 2023 14:09:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1678367367; bh=MafeuVbYKruCV7A6r0kvRkWsKQK97fI96NUreRtk2xw=; h=From:To:Cc:Subject:Date:From; b=qi/KbAydAZ0Vq7x5amCPHYtYzHI4kq5cMwK/QVED/lsZlXeCf2TLxh5lymXrXvlgd kP70JXBArk5WljwrrnTpSWFVBtxE2HvNK8BNf7/UtTPyzawRKPY3ZofgjLH34UanpB Tr9zOOT8QX1kUL9Gw/OjMj8gzHQAhmOC63ib1eHE4D8GOKv/GTkc2M0GgfhwfML8Lt xnNDM1Z/KkBzHx0cn8oBEtjCANj+yoXTBqQtaMxtKKkl4IDv7w5twXWTYPYdne5i91 0l7YSq6IGbsB9laO0XEc0NmEmoQLkSI4VxZlGAK/KCIlQsEv+/+/KrQAsnX9kFx8Y9 QQW/hMus9yldQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PXTzS1SgDz9rxG; Thu, 9 Mar 2023 14:09:24 +0100 (CET) From: Ihor Radchenko To: Zelphir Kaltstahl Cc: Bruno Barbier , emacs-orgmode@gnu.org Subject: Re: org-babel guile source block bug in handling multiple values In-Reply-To: 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> Date: Thu, 09 Mar 2023 13:10:56 +0000 Message-ID: <87sfeeoysf.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=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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678367419; 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=xQqIZb7PhevRN1EbGjaORbiT3itsAl3FLasZfm8fVgM=; b=KvBj9Hvb6MyvHCOArqU6+pHXBkEwnltQWrmfUXutrigQCNkl+ACtcyPMorN6zy0jL+C2yV dKkA4/ThWvsgID6gvUQgWJtP2Rw6mxCXDuRyVl1TH0nbgWi2fQ26kc2nRLK2SRgZoWYVR9 nBxN9Gy7R3WNdIIYqaOigykMDtG9cET5odGvYNxT6f3vdCZ3QgwNfZECSK736CU0ZKYrpK K9G/01k8FKC8E7n8+tgQoAXR8gnpwmJTb//ziesXVPgU3ghYCCtWLYAfzcuGYYCUcyUrsH uNwEI/74e4gMikOtpFrBVqeKN352vfOoeKRe3YV+RijiReAccjhlQu5BRyYJGg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="qi/KbAyd"; 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.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678367419; a=rsa-sha256; cv=none; b=YhNRu7WfTZh45AqIuTdNAVYLetDDiwL5qRGLYGu98dHjdA5UJdCcXIob0s8QHhMCm5KTL5 a+t2yUPap/YF557xWQE3iLeqdpKkEL22MpXpBO0zacBbsHIzu684oA06LoSm+jQKeXygih fzNbjZnAYwobFgNq9R5oaDRSbKtF5puaHMcON3Zd+zwI+38ae0VtP/bf7i4INFw5/ZtBAt n6I66jdxMjiyEhmF2g1Whrh0GRaMAb/86yxCdCE74KiH3QfqALgcUYPCy6oTjgGYxd3tY0 P+HlrAI/hzIQ0UhvmFPXH93Tl0DNjNW7OZSg/1/UCROSmevdyfirQiInuQx8vA== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="qi/KbAyd"; 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.net X-Migadu-Spam-Score: -4.69 X-Spam-Score: -4.69 X-Migadu-Queue-Id: 3439A9EA2 X-Migadu-Scanner: scn1.migadu.com X-TUID: wzrkBfr75Ze1 Zelphir Kaltstahl writes: > ~~~~START~~~~ > #+name: python-imports > #+begin_src python :python /usr/bin/python3 :results output replace drawer :var x=4 > import math > > y = math.sqrt(x) > # print(y) > #+end_src > > #+name: python-usage > #+begin_src python :python /usr/bin/python3 :return :noweb strip-export :results value replace drawer > <> > > print("y: {}".format(y)) > #+end_src > ~~~~~END~~~~~ > > Unfortunately, this example does not seem to work at all, but for a different > reason: > > It seems that using any Python source block with :var header args via :noweb > does not work, as it then behaves in the way, that it merely pasted the included > source block, without first putting in the :var values into the variables. I get > errors about those :var variables being undefined, of course, since they are on > the included source block, not on the including one: > > ~~~~START: *Org-Babel Error Output*~~~~ > Traceback (most recent call last): > File "", line 10, in > File "", line 5, in main > NameError: name 'x' is not defined > [ Babel evaluation exited with code 1 ] > ~~~~~END~~~~~ This is expected. Noweb includes the src block code without altering it. See 16.11 Noweb Reference Syntax We may probably clarify this in the manual. Would it be helpful? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at