From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QMBRMMKcX2PmOgEAbAwnHQ (envelope-from ) for ; Mon, 31 Oct 2022 11:00:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QJkZMMKcX2M4gAAAauVa8A (envelope-from ) for ; Mon, 31 Oct 2022 11:00:34 +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 48F7317BE7 for ; Mon, 31 Oct 2022 11:00:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opRZZ-0004Rg-96; Mon, 31 Oct 2022 05:59:13 -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 1opRZW-0004Qt-VH for emacs-orgmode@gnu.org; Mon, 31 Oct 2022 05:59:10 -0400 Received: from mail-vi1eur05on20703.outbound.protection.outlook.com ([2a01:111:f400:7d00::703] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opRZU-00082E-Tx for emacs-orgmode@gnu.org; Mon, 31 Oct 2022 05:59:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MXL+m0ts9ieWEYIBbyOwo4lH4fjgLRnfwWUytbtda/WXsSmdgpbt1JPSsNJt5JzV+A5uSX982ndsCdsSYlfdpO7Z8lJDH4IHWEVnCMRlFm/mEPdMJY5Hfqe22o10fmOpy09nDovdDhcnwaJ+NNR++QFsV9JtDBU7nKcTzc72Bhqxwnlrs4M3NgmyAXnarlN/N+d15Zxy7UTvU43TjMHcfMcjyDURcDtEqwn1rxKgNaL7ARgL/SFmQOSbusTXd4zHXORtz/zEO2oFyhqq3kdXqWv6KMPtZkQqGl6BJR/GhcZya2yFHpvw0h7uG9k+yoFEaMY6pYOmhJdXPEHqG83PtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hmc2PCiLfTtftN4IPzKoRHEGKqsvvGxqyWWNCfsejBE=; b=ZPRyIv5K7pYRUvyiivH5Rg/yOSlKC5LfoQeRqx1fw3nPcytwWTViN9ICxx6CTFFa421sd9DSlOZB5oyegcv6yZ1wqk6O7z0egaa00oQAp184CmK9ygIu+0mYl7nauPSygUyPNddyqi/r5csds5y9S4+cf1EX2ZgoUbx8FP2pIDOiyKMmeRXrUB43WhvSPg/qCCHQZ/eMwhlCLaO0OJVpEsaLyvNVjntwhtx6JNxzeUsRQ6hdzZFEcm+vd/Qih88BpNNFobpO6pPwMEnpCCVUNi5g8bMw6+prlNJ2szxjM4QpPncBazku9Gujo+P+TkySzMQeHE05V3Cuy78GFLBaeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ucl.ac.uk; dmarc=pass action=none header.from=ucl.ac.uk; dkim=pass header.d=ucl.ac.uk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucl.ac.uk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hmc2PCiLfTtftN4IPzKoRHEGKqsvvGxqyWWNCfsejBE=; b=bJTDr+nR6jElXofesK3rF5xoOWwQW/Jm+n6NTWd35JnhRPZxWqM0y9XzNYmBFlsmj/VwjXfDcP/QuBHSKndbUhzE02f5Ml04+pOzZQs6bzm35N5ceM6pc7HfI5v7BKoNkoas7Ce9389ktZC6g1ER8gQ67ODWIlJlxM/vzEQpwfA= Received: from AS4PR01MB10249.eurprd01.prod.exchangelabs.com (2603:10a6:20b:4fa::21) by AS4PR01MB9584.eurprd01.prod.exchangelabs.com (2603:10a6:20b:4c9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Mon, 31 Oct 2022 09:54:02 +0000 Received: from AS4PR01MB10249.eurprd01.prod.exchangelabs.com ([fe80::e7eb:8ee5:5ec1:2673]) by AS4PR01MB10249.eurprd01.prod.exchangelabs.com ([fe80::e7eb:8ee5:5ec1:2673%6]) with mapi id 15.20.5769.019; Mon, 31 Oct 2022 09:54:02 +0000 From: "Fraga, Eric" To: Ihor Radchenko CC: Ypo , Org-mode Subject: Re: LIterate programming with calc (help) Thread-Topic: LIterate programming with calc (help) Thread-Index: AQHY52N3sPluuAx4d0GRGDiIovWO8Q== Date: Mon, 31 Oct 2022 09:54:02 +0000 Message-ID: <87tu3kb9ol.fsf@ucl.ac.uk> References: <871qqojqis.fsf@localhost> In-Reply-To: <871qqojqis.fsf@localhost> (Ihor Radchenko's message of "Mon, 31 Oct 2022 09:23:07 +0000") Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Gnus/5.13 (Gnus v5.13) x-url: http://www.ucl.ac.uk/~ucecesf/ mail-followup-to: Org Mode List x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AS4PR01MB10249:EE_|AS4PR01MB9584:EE_ x-ms-office365-filtering-correlation-id: d4fb23ad-4cad-40f3-7be3-08dabb25d760 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ktSmMbbBeoBN+yVvCiadlTs5EJmnaymvyFT910CkqtamjdPk1KSiOzDfkicGYc/AjP8qU2e6+m2R3M6q7gYss21OQ0u8V6ZbForgqOVHvbPj8p+lvK+V8ZjLPZgk5IAuNAJ0u8hvccrk7350i8YWiFUcr5kUfprK4GGr6h3mtrDgproENEXy4+9qaVgb22qmor5ooQybLFBel4wKBOED3gSwFJmniYeZMtqEclCy5/paRYHkcqvK+/hvMlGMtUyojaeENe9+DIdZKljcXu9qxj7ESyS/F9wJnPdun+eJGJ0g91c9KGUEZs2CnAuOJNr73loHnkvCVsZH9yeWOh8uLNCnlQm4JL0xWnirA6sWUbUAZbQ+PWNNqovSI3DwSSEomzNyElkoC2NBDJYbr52FK1NN7rfXnRCuPhR/Hs1NSrabFPnBErM8K218bXLe+I7sHyDruAMNNIjs9yT5nNydCJVsXw3sKXk6u1drEaDZtHvq+hzelwgdakwjARwrTUwqPbkhlvcUA197TlKfXuqwbjcv7vJgy94+Jc/VMMvcdfmgP3qJfQCh8BgdR9sTMFF+ZhhJMksMQaLMHG4SxFp/JtrKBlIH1KOfnbTy8H0lxSYD3SS2bRU4l4cOYe5VkSh9rGbGaDD6II6DLoa/JdZLtGMNmJ+KMGtmtPfFVNO+GNj0m2o+GwzOZghdSSrHSep16zNG1Q4Gc4OeHUlEY1qfPwNh3fwkeN0QX6xoTk/CmAZRqeZ/gVBIeCNla9VSIrHAwBeLgZVt2JhWF8na73aQKw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS4PR01MB10249.eurprd01.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(39860400002)(396003)(366004)(346002)(376002)(451199015)(71200400001)(66946007)(5660300002)(66476007)(4326008)(316002)(786003)(91956017)(76116006)(6512007)(38070700005)(4744005)(8676002)(6486002)(36756003)(54906003)(478600001)(186003)(6506007)(41300700001)(26005)(2616005)(64756008)(66556008)(6916009)(2906002)(86362001)(66446008)(38100700002)(8936002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?8R75azEwFzOgjRknOIEuR7Xo5MWOzaXN/2yLZ4d02R/0UzsOaFbM9KSek5?= =?iso-8859-1?Q?4YG+H4wFa285Baw4LOsgD8Rdpur30V9NMMy5tHfLfYTk12ceXvKOkPflhq?= =?iso-8859-1?Q?vnUiuMW/whI6aydjIhgZHpsxZJzF0SdXYSoaJB9jr5R+Ynl9DykxZzyDrj?= =?iso-8859-1?Q?WSAttSuyfFBL7O8NuyVjNwmRlWp7RYgNV0d5+QW/kImgAFEjY+ItanmVVf?= =?iso-8859-1?Q?jfK1vAsmF8OoTsk2FLRZuofMIe4e02uWMKEgyYdPP7fL4UbCOG9phmoARm?= =?iso-8859-1?Q?8e/bMNdQLjXEzcNsT4Y8I0BKL0s5NpSuI8gmTeDwjzl0Gc3lmgvUZnfhXV?= =?iso-8859-1?Q?vePIIRQCeELyC2wFFNJc/Nt5mojk43712554FhkQ5XYBnI6kksYaBNFK18?= =?iso-8859-1?Q?JUCAPJHsSC8E6zN8qHk8JYZdwcx0hvf4IkWjijYnTKjqPb114e0TqKi+W4?= =?iso-8859-1?Q?xz7iwzeFDXSOS1lqR7ug/fdpZgwBwqb4r3heFxmcquR9selMZSdR796Jtt?= =?iso-8859-1?Q?IS9UJfu02gSQ2CuAMXzjNqU0+i1A39s4lN95fvz1b9Sc3hnY99GcCm1dvF?= =?iso-8859-1?Q?sY1Z70a7gVH4CJTySZgt8+byuryedGBo9enuQ9jTmjCHV+DTBu77LEBiSu?= =?iso-8859-1?Q?DMvi13b1YJrnPLmpwdnQGBAKqXluFfFfcqtwFMCCerWVlOBmM/01uYaB+m?= =?iso-8859-1?Q?RNLGwXxj2aNmy8eoti9RNWP6auGD702dmpwdyFOCiTWXWlSjj9cfJNGhIx?= =?iso-8859-1?Q?0+ZtazMkYlBPiq5+Ip249wgvLFejO/vcXHM/6O3IjT2tC1xmuwQ29eadk+?= =?iso-8859-1?Q?wRXY9Y66s6DJaRilEzc2r88Xqej7xRNw7XB1fH+pazFjDhm6pNyvjrSEk5?= =?iso-8859-1?Q?PQCCiu05UktdNBM16DaaxYpgq72RoasQwZohUqBUAXwTY2KAXVkggQLTg2?= =?iso-8859-1?Q?rZnbE/ldAECCz5R0zxXvzeZBWpeHH41IcQG077QS1mErVoqO8QhnLcETON?= =?iso-8859-1?Q?Rd+hVlxS5uXC8aoyj6K6zKPYDzf7agF9xbEEBYKdiWI8BJUhanCDldWa9W?= =?iso-8859-1?Q?Rh1a6jw3v17AgedJ/S5N94HtWDzI7zvSpvsHKBcDoMpLhQYwTjfgrwy05/?= =?iso-8859-1?Q?oRkVMgAfhBTPiWJyKuGlI+SqFEotMVkcKdd1C1y0/d6qgu/czNA71nypnW?= =?iso-8859-1?Q?alt79XDpOE5bZTaelEoz6Og2nGACyfkt0gumVm6o639cEEK4EFezeuoaGC?= =?iso-8859-1?Q?c8u71vXLEl5ieZGyOkitel0fDIOPCpr8ulDzl4PoE1RAJT1eNL/Piftn93?= =?iso-8859-1?Q?g6NGiPwzFhOvP2rxkmSceuzgSdNMmiFEwT/1DeYLmmTDPCp/3452LbkqOG?= =?iso-8859-1?Q?IP3aqwXPgxvb9LtPq7Ptnsdz/4k8EFV78wwPJFDXntrBdB3rykiUaqemmL?= =?iso-8859-1?Q?qyaoAD63COFvELpFv+xJgAB3XaxkzK00G+2yEC6Ryv8tSoNTiYupEnE3cV?= =?iso-8859-1?Q?PALNtVWh69eekKdnBAz3/vWn6EpGJmpn8Ds1F//Lpy0oGMqrYbMm348mXo?= =?iso-8859-1?Q?x8Jt9WoKTs3I9G1siIRGIZIHPxd3bCLpq6UlXDfgZyUUtFSDJ8147x0riB?= =?iso-8859-1?Q?0h6iEjZanrd3je1qeHWlJ8XoU2BLnkLPKi?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: ucl.ac.uk X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS4PR01MB10249.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4fb23ad-4cad-40f3-7be3-08dabb25d760 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2022 09:54:02.7330 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1faf88fe-a998-4c5b-93c9-210a11d9a5c2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: G5dhZvvYJrQmLukGQKK52qUY6HdLXQtBuTX3ArvH1MMSPdreaBfQjcnu2UFhVMW7CmBM9redkeMA1PiTBiovCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR01MB9584 Received-SPF: pass client-ip=2a01:111:f400:7d00::703; envelope-from=e.fraga@ucl.ac.uk; helo=EUR05-VI1-obe.outbound.protection.outlook.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667210434; 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=hmc2PCiLfTtftN4IPzKoRHEGKqsvvGxqyWWNCfsejBE=; b=hKKLYFBGlcXb51WGL5GbJgnpizDI0yx9eypvPXMPXZn4Ax15FmTNYqslOqmwGFcrk2Hdci eOwWIwGQQM8bMcGfugWM5CVf84/y8dh0aANQW+m885vsoHRCObrgVcY02HJY6s0HE3mdPw k4WQ8OFKbXZ23WEmkw1XtCReJwp2o3+uQvBYtvQhU/PGGmLh8YQyc75qlL20b8O3SyKwnt L3mdW58lZFsSEF4ILYxtqeM4sZ3XsMoo+e0hSFOLoJ4x8iNZw9VVlwvB3ZggPPf20kKSvI U36ip3J59wVxicoGWFhj1n2EjCXsSu1x3CALqvxUiDoSzKx65uYhKnuhvpFl3Q== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1667210434; a=rsa-sha256; cv=pass; b=qxYUmE3C0E60s1KlXusoOr8uAAKPoRYvjGAJEe59jLKKQ+fG1Jciq5o8zNR85b32/Crq5v ZbkIg4Feav7/xBxtopCuCpjC0fMomOzo909AYXOEQYsWygSrROukVYI9dBp3ushHuQvdTO 7lXSZen0IdmH0DWCkLxcKQ4IoAxqK+PxdceRYG+u+EQqrzld85HfE8XAtBdkuTgL1ZF37h RijIgP205UUJogNnLxSeszb8haRq2SwQ/WYdYrjIKSvyI0xFN9WqRPrfe9O8xCU9Xfs4O2 L36VO2iAIJVvwlT4z2M5piJYug3vQDJep69nIhpzGILQEachdwtcOaGFnTDHlQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=ucl.ac.uk header.s=selector1 header.b=bJTDr+nR; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=ucl.ac.uk; 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" X-Migadu-Spam-Score: -5.96 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ucl.ac.uk header.s=selector1 header.b=bJTDr+nR; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=ucl.ac.uk; 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" X-Migadu-Queue-Id: 48F7317BE7 X-Spam-Score: -5.96 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2Kpy8lhGhYlW On Monday, 31 Oct 2022 at 09:23, Ihor Radchenko wrote: > I looked into ob-calc and it looks like the way to define variables is > via :var header argument. Indeed. Something like :var a=3D"300 m" does work. > I guess that the main problem is that calc is tightly integrated with > interactive commands. Maybe ob-calc could be extended to somehow > indicate the commands to be executed in addition to inputting stack > entries. > > Not sure if there is much interest in such feature though. Thinking out loud, what would be better, but I have no idea how feasible it would be, would be to have ob-calc make use of the embedded calc functionality and syntax, so that you could write something like this: #+begin_src calc a :=3D 300 m b :=3D 2 a =3D> #+end_src which would output the result of any line with =3D> on it. --=20 : Eric S Fraga, with org release_9.5.5-1028-gcd835d in Emacs 29.0.50=