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: Mon, 09 Sep 2024 12:13:21 +0200

Ihor Radchenko <yantar92@posteo.net> writes:

> I just tried
>
> #+property: r1 0.96
>
> | value | 0.96 |
> #+TBLFM: @1$2=$PROP_r1
>
> followed by C-c C-c on TBLFM line, and I cannot reproduce.

Indeed, when simply executing the formula nothing goes wrong. You highlighted 
it below,
the "problem" occurs via `org-table-formula-from-user'.

> I _can_ reproduce via C-c = -> 
> `org-table-formula-from-user'/`org-table-formula-to-user'
> where is it a result of the default value of 
> `org-table-use-standard-references'

The same for me: I can reproduce via 'C-c =', or via the formula editor in the 
cell
(':=$PROP_r1'). `org-table-use-standard-references' is interesting, I did not 
see it
before.

>> -    (while (string-match 
>> "\\<\\([a-zA-Z]+\\)\\([0-9]+\\>\\|&\\)\\|\\(;[^\r\n:]+\\|\\<remote([^,)]*)\\)"
>>  s start)
>> +    (while (string-match 
>> "\\(\\$PROP_\\)\\{0\\}\\<\\([a-zA-Z]+\\)\\([0-9]+\\>\\|&\\)\\|\\(;[^\r\n:]+\\|\\<remote([^,)]*)\\)"
>>  s start)
>
> This is doing much more than fixing the reported bug and might affect
> valid uses. I'd rather fix the bug (if it is a bug) explicitly, without
> risking breaking other things.

Hm, looking at the manual ("(org) References"), a constant of the form 
'$PROP_Xyz' will be
used to search for property 'Xyz', and it seems like a bug to convert 'Xyz' to 
another
format in this case.

The only use-cases that are affected with this change seem to be when a table 
formula
starts with '$PROP_' and has a spreadsheet-like reference after it, no? Perhaps 
I am
wrong: I searched for the usages of `org-table-convert-refs-to-rc', but perhaps 
I missed
something important.

Do you agree that it is a bug, even with `org-table-use-standard-references' 
set to `t' or
`from'?

-- 
Best,
Rens



reply via email to

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