emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange behaviour with $PROP_r1 value in a table


From: Rens Oliemans
Subject: Re: strange behaviour with $PROP_r1 value in a table
Date: Fri, 06 Sep 2024 11:40:47 +0200

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_<remote' still gives '#ERROR', is this related to this 
bug, or is
  the property name '<remote' invalid in any way and is this intended?

- Should I add tests for this behaviour?

Best,
Rens

Attachment: 0001-lisp-org-table.el-Don-t-convert-table-references-for.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]