From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id KJEpBInO2ma8dgAA62LTzQ:P1 (envelope-from ) for ; Fri, 06 Sep 2024 09:42:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id KJEpBInO2ma8dgAA62LTzQ (envelope-from ) for ; Fri, 06 Sep 2024 11:42:33 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rensoliemans.nl header.s=soverin header.b="mgXPxFd/"; dmarc=none; 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=1725615752; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=dU0QnM5NvR5luJKZIuQKQPxXvSWyvWDSnuNOL0stnuQ=; b=hIKS45KPZo3uXdfS7S1b/9taK8NbyBLfDa86e5EHi3tkWh6aELvglabyDFpw68F7BpRqdM rvpAsMEuSn2VLtLpAtD7ZOGVavRFys3nkumpsTnj5meQIX2hgjLRrp5ilAmt/xM+6jysgK Kq4RGvjrps/kqx1yqSti/TctQoWMKsCm9ZHKrJS6Mzm26waoQ1U0hAz5dZ5CH2wPO1h+hA UEd5gMZ6MlP8CuadRgfWyE3SasI4IAiTNcOwrPdHVfcCPWv7Msos/fZqcWUlBkZOfa1oFh +b2q9x3pKQ2HCC0rycAfYnoqV+gh9QN9RXfhZxqVvfu+yvyHWZfJx1HuPtzHug== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725615752; a=rsa-sha256; cv=none; b=TzJu3Hl9gaHi8JVVYLQXQtVPOTDqNERM44lumHl+39hEy4lKjPEJ+g1z/ZdYseM9AqFq3P kkoCGDDZckKcbymZa7b83QJMqmlb1Dr95GGB3yJOJ0c9QSSl+2C/OpmQJKnIza0VYM5AEf VokF117D7YtjwPgDQGJuMBkVf5PFPe7eZPJp48dcvWKDEApz7vke4viZgV7FWCEIeo323y Ki6W8fvUzifl+nLVMbGgqCFyKoyMN+KmOcreX84gZGOV2a8z0RvGw4/MN1bnBTyNEomC7Q qTZWM+BtW7MaLEvISmXh0spkihlCwrwPl6tnkDjgKNRZIq8SvYwKz9un35g6ng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rensoliemans.nl header.s=soverin header.b="mgXPxFd/"; dmarc=none; 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" 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 D9009633DA for ; Fri, 6 Sep 2024 11:42:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smVTB-0003pJ-2u; Fri, 06 Sep 2024 05:41:33 -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 1smVT1-0003oN-Hd for emacs-orgmode@gnu.org; Fri, 06 Sep 2024 05:41:24 -0400 Received: from outbound.soverin.net ([185.233.34.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smVSx-0006KM-3Q for emacs-orgmode@gnu.org; Fri, 06 Sep 2024 05:41:22 -0400 Received: from smtp.soverin.net (unknown [10.10.4.99]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 4X0WSK1yfjzKH; Fri, 6 Sep 2024 09:40:49 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.99]) by soverin.net (Postfix) with ESMTPSA id 4X0WSJ3wqDz3C; Fri, 6 Sep 2024 09:40:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rensoliemans.nl; s=soverin; t=1725615649; bh=CjONkMd/Teaxr34/rLb9PERh5/BPboZpoSIQ148814A=; h=From:To:Subject:In-Reply-To:References:Date:From; b=mgXPxFd/Zh6uULt2bY27uNkv0tUTXwILcFfM5UeexA5ZtB5EUxjyiAU/8KhbKXRnz k7Vl5tQiU5sYunoheX0tv58RCLDFbU4xU0VzouE//JliB2KA558qxJcImbQKbrd9Ih hbkmeeSuYwFFq66DlsHP+MihM6l/U7K3OqOXAxVfDyE9UAuUeMZQCYLhx5mhoWiPuf wXGp8hwxeCxRcLNaX85ITesA8foWb4WkilRECRyYyMZYxC2U0F/ekH7Fptsxa3OZV6 owTqjWqN8Pak0UAFWcsCdkE61GI3z6ghZI9mVJeyg/U+RXvIt7eyGc/WakfSXtEIi/ XlLblop9iWhQA== From: Rens Oliemans To: "Fraga, Eric" , Emacs Org mode mailing list Subject: Re: strange behaviour with $PROP_r1 value in a table In-Reply-To: <87jzfqjsyr.fsf@ucl.ac.uk> References: <87jzfqjsyr.fsf@ucl.ac.uk> Date: Fri, 06 Sep 2024 11:40:47 +0200 Message-ID: <877cbpce74.fsf@rensoliemans.nl> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spampanel-Class: ham Received-SPF: pass client-ip=185.233.34.18; envelope-from=hallo@rensoliemans.nl; helo=outbound.soverin.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: D9009633DA X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -4.59 X-Spam-Score: -4.59 X-TUID: 5u/suyHNmXgC --=-=-= Content-Type: text/plain Confirmed, this is indeed strange behaviour, I think a bug. It happens because Org supports both letter/number references to cells (like A7, or in your case r1) and also Org's default representation, something like @7$1 (equivalent to A7) or @1$18 (equivalent to r1). Wherever appropriate, it converts A7-like references to @7$1-like references. See more in (info "(org) References") , and specifically the "Named references" section. You can evaluate that info sexp, or find it in section 3.5.1 otherwise :). It seems like a mistake to convert such a cell reference in the '$PROP_x' case. The conversion is done by 'org-table-convert-refs-to-rc', which is done before 'org-table-formula-substitute-names' is called. Simply changing the order will not work, since the property value might also be a letter/number-like reference. My added patch fixes this by not replacing such a representation when it is preceded by '$PROP_'. I have two questions about it: - The function '$PROP_From b1b57f263853d28777f4067e782d5cf401e73691 Mon Sep 17 00:00:00 2001 From: Rens Oliemans Date: Fri, 6 Sep 2024 11:36:57 +0200 Subject: [PATCH] lisp/org-table.el: Don't convert table references for properties * lisp/org-table.el (org-table-convert-refs-to-rc): don't convert refs to rc for properties Reported-by: Eric S Fraga Link: https://list.orgmode.org/87jzfqjsyr.fsf@ucl.ac.uk --- lisp/org-table.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index a0708e3ec..b1c5f8fbc 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -3451,7 +3451,7 @@ See menu for more commands."))))) Works for single references, but also for entire formulas and even the full TBLFM line." (let ((start 0)) - (while (string-match "\\<\\([a-zA-Z]+\\)\\([0-9]+\\>\\|&\\)\\|\\(;[^\r\n:]+\\|\\\\|&\\)\\|\\(;[^\r\n:]+\\|\\