From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6CyuD0jkkV8oGwAA0tVLHw (envelope-from ) for ; Thu, 22 Oct 2020 19:58:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0NDhCUjkkV/aSAAAB5/wlQ (envelope-from ) for ; Thu, 22 Oct 2020 19:58:00 +0000 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 5CF74940418 for ; Thu, 22 Oct 2020 19:57:59 +0000 (UTC) Received: from localhost ([::1]:50206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVgik-0004Jg-0c for larch@yhetil.org; Thu, 22 Oct 2020 15:57:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVgi2-0004JY-EV for emacs-orgmode@gnu.org; Thu, 22 Oct 2020 15:57:14 -0400 Received: from mail-02.mail-europe.com ([51.89.119.103]:58296) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVghz-0006Ta-Ch for emacs-orgmode@gnu.org; Thu, 22 Oct 2020 15:57:13 -0400 Date: Thu, 22 Oct 2020 19:56:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lambda.cx; s=protonmail; t=1603396624; bh=0JrDgFZaZRPV7qbR7HH7+v8/STAkX71U6ALojKqrefo=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=FU4OHLBtJn/HzN3iXGi7RtisgHHaaK0FohiyufLZo+K6jO7vU4yL2Ut/F40s1uFCy 5QPDOK+ZOjCXrpewU4CcrjVWl76UzXiPsysVH9ZzrFIIYcwuRY9ed5DTpCcxwHvLvk 8qnDwPSoJxlbxSm7PXXqYrR4HcJw1l8qhxkvUzIg= To: emacs-orgmode@gnu.org From: Dante Catalfamo Subject: =?utf-8?Q?Re:_Bug:_Can=E2=80=99t_assign_to_hline_relative_reference?= Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=51.89.119.103; envelope-from=dante@lambda.cx; helo=mail-02.mail-europe.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/22 15:57:07 X-ACL-Warn: Detected OS = Linux 3.11 and newer 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, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Dante Catalfamo Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lambda.cx header.s=protonmail header.b=FU4OHLBt; dmarc=pass (policy=none) header.from=lambda.cx; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: tSHCvqHtdMt8 That seems to work for the most part, but now I'm experiencing a strange=20 difference when evaluating. If I use a formula like =20 #+TBLFM:@2$3..@23$3=3Dif($2!=3D0,12*$2,$3);%.2f::@24$2=3Dvsum(@I..@II);%.2f= ::@24$3=3Dvsum(@I..@II);%.2f The column gets evaluated first, then the sum at the bottom gets=20 evaluated, resulting in what I'd expect. But if I use a formula like #+TBLFM:@<<$3..@>>$3=3Dif($2!=3D0,12*$2,$3);%.2f::@24$2=3Dvsum(@I..@II);%.2= f::@24$3=3Dvsum(@I..@II);%.2f The sum gets calculated first, and the column after, meaning the sum=20 doesn't reflect any changes made before calculation. I find this pretty=20 strange considering the formulas are in the same order. Do formulas=20 involving relative references get calculated last for some reason? On 2020-10-22 8:04 a.m., Maxim Nikulin wrote: >=20 > Dante Catalfamo wrote: >> In the case where I'm using this formula, there are many more rows >> between @I..@II. I only used two in the example to keep the email small. >> I would also be adding more rows regularly, making it slightly >> impractical to be adjusting the beginning and end points of the formula >> every time I add or remove a row. I appreciate your suggestion, though I >> was hoping for a more convenient solution. If nothing else works, that's >> what I'll do. >=20 > You are not alone. From my point of view it is not clear enough from org > manual that @I references could be used only to the right of "=3D". The > error message was a bad surprize. Another similar pitfal was with named > columns. >=20 > However in some cases @<< (unlike @2 remains unchanged if a new line is > added before second row) and @>> could be a workaround. If there are > several horizontal lines, sometimes it is possible to mark particular > lines with # and use e.g. $3=3Dvsum(@-I$-1..@+I$-1) to avoid proliferatio= n > of same formulas for each table section. >=20 >=20