On 25/07/2023 03:29, Gavin Downard wrote:
Max Nikulin writes:
I have tried the patch. The formula for the named column "$three=" does
not work.
| ! | one | two | three | four |
|---+-----+-----+-------+------|
| # | 1 | 2 | | 3 |
#+tblfm: @>$5=$one+$two::@>$three=$one+$two
Yeah, I guess my current patch only supports column names in column
formulas. Allowing column names inside of arbitrary references will take
some more comprehensive changes. I'll see what I can do.
The regexp for parsing formulas does not allow named references after @.
I have no idea if other code should be modified as well. I consider it
as more important than detection of duplicated definitions.
A crazy idea: several columns may have the same name:
| | Jun sum | Jun count | Jun avg | Jul sum | Jul count | Jul avg |
| ! | | | average | | | average |
|---+---------+-----------+---------+---------+-----------+---------|
| | 150 | 10 | | 200 | 14 | |
#+tblfm: $average=$-2/$-1
It has no sense for numeric references but with names it can help to
avoid repeated expressions.