From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qNE6D4cVXGfqDAEAqHPOHw:P1 (envelope-from ) for ; Fri, 13 Dec 2024 11:07:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id qNE6D4cVXGfqDAEAqHPOHw (envelope-from ) for ; Fri, 13 Dec 2024 12:07:51 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=AFGI1d2D; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734088071; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=DJx46O+8Bf5VLkp+XKZ7ovBd4u9RFpZBTAR7B1fT/m8=; b=QrbugUrYSpEiVV14PZ5M0q4ch/CTZNS0jE9eJgCeY75GiwZPBPN4s5++1nz0aLpiA1mX3R Pt5pLnZ2IBMxIP+48dLbsOPYmn3qb1FcEFvU+dXtzVLknmS0dsNwIuWw9UcaRA4TisgBiP dF8lWItF7jymEB20BdmAgu5xfdcVOwU/PYFnb/kW9Blt3T9b00rT/76MRehHH2CCuxyIne hnxGmaOAAz8Ftqi65Zz4yZqNIK5dvVqrI4O77AzXhEa14f08ZJPCwkdtWcC3mC8czMJxTH gXpnRbKXP6DjArr5MRXAq8cQZS6VbfBC6+UWXUQOeS27MhYPTfDOQryssGsTWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=AFGI1d2D; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734088071; a=rsa-sha256; cv=none; b=Qt8cso4ELp8H+05GECTy2BLB+bFqIg48dG+WKHRyGaqFPVewfL6/3iEFpq2R0TIKFB2WUG ZpnumxTF+eYyeuw1zxE8/9A16Mb1jF03S0QCGY1p/gBWqAhCEBlGhrg2LQhsGh3U5cBEAC rmIcqv8mR42ADivFxZvbm1ZSGvhiVVqfSVoH9HPNfDo1UrLXQsyuQQWJdFsL9R7bgv/z+O QllakpmuNeGRqWQMHr3T5gKpcAVYAzsb+jSD/gxNb/R/saFqfurqL2SB2rjOXZpj+VI9ab MNd2Wo4M9gbkHInFi5xQUM8vKOejNXMx2R5XwufOYtLBVyWKu9X3Yb+7rEk5VQ== 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 1EEFE7ADEC for ; Fri, 13 Dec 2024 12:07:50 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM3VU-0005vq-DH; Fri, 13 Dec 2024 06:06:52 -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 1tM3VS-0005vX-Cq for emacs-orgmode@gnu.org; Fri, 13 Dec 2024 06:06:50 -0500 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tM3VQ-0005bj-Gc for emacs-orgmode@gnu.org; Fri, 13 Dec 2024 06:06:50 -0500 Received: by mail-pf1-x442.google.com with SMTP id d2e1a72fcca58-728e729562fso1323859b3a.0 for ; Fri, 13 Dec 2024 03:06:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734088006; x=1734692806; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DJx46O+8Bf5VLkp+XKZ7ovBd4u9RFpZBTAR7B1fT/m8=; b=AFGI1d2DyASPVMSiGORqyKSEy+OaZB6P/JJgQTXUcVoctJe2sP3AlTmiFQQEZf08N7 UTYfT8WhdOGepueHHaA4BwDk6yYsQ2dSFbdS7wLqtZtyU46AJl1YL84oMYVES0yzJY3s baZ8IXJPb9Ttvjj1xHOboZxw958rpYMNhj1qY+aF9mtLdDfZwgkxDj1lCmOP9t3k8q35 OTU5zAfUm+90lUpKq8FB8JNNZ9/WtjgIlTUGE7VgEiNvGyVlMWFgqBp3Q61/g9jWj6/y NrbdyiPTpZkD0wxYYA9fWA7skUXqe+onlZQBrQczU/vxJ+D59gy9XEupCLiSPio6pIwp Wi6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734088006; x=1734692806; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=DJx46O+8Bf5VLkp+XKZ7ovBd4u9RFpZBTAR7B1fT/m8=; b=FeVl5rVR8YWnpkXsJUnzJc1mzl4WdG7maudGmJQ5qf4LyOs9o1/OQtMKibb7PXua2t gRKoNA7p+362l5JhEOup92mYlyI+uHg0BCac1vHvtvtIEwAfig9jCATU9VQaIDV+m5X3 O6qVTtIRGH2+5zMCJHnTSATkOnb4ynO8TuXt3nY6KgeJ5ZopWmmk6zzwjFXJBDJRr2pK 5pTljIhxbkQWyndazrKWgg23rHrVVAJ+pjrKlb4QyXaGlMoR5tcQEc7kT173OnPKzCyY /fnXy/kNS7/Aou2nmpINegN6fRbgodegQutBlY9kbJNzrkXkehurdEQEk2D4J7URv8BT BOmQ== X-Gm-Message-State: AOJu0YzfKHPXYidzK1YhNcbuo+C1iF6RGaURH/TiJVOpNBTSRXRX7J1K JJq+BqpJer9TIBb+i8tIuRlI+cTQva7hiY0TwU1E1UEjfFpgN4JklHSPsDyJ X-Gm-Gg: ASbGncuh6zTOlHR4wz1anabo9YXXrpTLWIMt7OMRZ0llga0N8t42Y2box0OFyGYsfRn D0iGXpdgIdTzmNSiDVRay9MOkISK0JHT5R4++zcVSvCIO9VHQbWn5mP0P8COULHRqaOywhZo9Nr B5cZcBErwdq0d0UbFg0KMTrkox/BQs6iZKmm1n7C59IOOf0ffU42J58Kuh7w76EOO1yFs5e6Z4o H72Z/aGYX9wymQjaSa8AgZXCB/diR3e1eTVnYgY3cQf3CQH10eX5g== X-Google-Smtp-Source: AGHT+IEDZfBTdTgpr/CCnJfbZKpixgIDhj7OIzloBA/z3+buSpGvhYmBjzmmxYSA9+PQxJXR7Hjiyg== X-Received: by 2002:a05:6a20:2d2a:b0:1e0:d105:1f42 with SMTP id adf61e73a8af0-1e1dfd4c692mr3698484637.15.1734088006052; Fri, 13 Dec 2024 03:06:46 -0800 (PST) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fd55eb21e9sm7284689a12.84.2024.12.13.03.06.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 03:06:45 -0800 (PST) From: Visuwesh To: Org Mode List Subject: Re: [PATCH] Add support for tables in Calc src block :var In-Reply-To: <87h677ua5c.fsf@ucl.ac.uk> (Eric Fraga's message of "Fri, 13 Dec 2024 10:53:19 +0000") References: <877ci2261h.fsf@gmail.com> <87y1aiijv3.fsf@localhost> <8734sq1k70.fsf@gmail.com> <87bk7eid26.fsf@localhost> <87y1aiz76v.fsf@gmail.com> <87jzlzhfiw.fsf@ucl.ac.uk> <87cyrbeure.fsf@gmail.com> <87sf0239bm.fsf@ucl.ac.uk> <87pllw2g4l.fsf@gmail.com> <87jzc42bxo.fsf@gmail.com> <87h677ua5c.fsf@ucl.ac.uk> Date: Fri, 13 Dec 2024 16:36:42 +0530 Message-ID: <87frmr3kql.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=visuweshm@gmail.com; helo=mail-pf1-x442.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -3.70 X-Spam-Score: -3.70 X-Migadu-Queue-Id: 1EEFE7ADEC X-TUID: Bi2uU1wOGt3M [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=9F=E0=AE=BF= =E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 13, 2024] Fraga, Eri= c wrote: > Response below/inline for email Visuwesh wrote: >> (original email sent 13 Dec 2024 at 14:32) >>=20 >> Update x :=3D 3 and y first. Then update `a' and `z'. `z' will be 10.6. >> Now update x :=3D 2, and update `z' and `a'. `z' updates to 5.4 as shown >> above but `a' remains 9!=20=20 > > Yes, this is expected behaviour. Calc assumes a sequential evaluation, > especially when the same variable is given a value more than once. It's > not like most modelling languages which look at the ensemble of > equations simultaneously. I assumed this was the case. It does make sense when you take the whole picture together. You are likely to use the same variable name (such as T for temperature) everywhere so it would be best to use the nearest one. > [...] > >> Which begs the question: what should be `x'? > > Ideally, it would follow the Calc convention and would be the value last > given (before point, where the table is), I guess. When we have x :=3D 3 | 1 | 3 | #+TBLFM:$2=3D$x x :=3D 6 | 1 | 6 | #+TBLFM:$2=3D$x value of `x' for the first table should be 3, and for the second 6. However, when we have something like x :=3D 3 a :=3D 2 * x x :=3D 2 z :=3D 0.5 * x | 1 | | #+TBLFM:$2=3D$x*$z what should $2 evaluate to? $z is straight-forward: $z=3D1. But what about $x? Should it be 2 or 3? If we go by Calc's convention, it should be 3. Do you agree? > But, at least, for simple cases where variables are not overwritten, > what you have done would be sufficient (and a really nice addition to > the Calc package!). > > I intend to use it for sure. I am glad to be of help, and hope the quick hack actually works reliably.