|
From: | Max Nikulin |
Subject: | Re: [PATCH] lisp/org-table.el: Allow named columns on lhs |
Date: | Tue, 25 Jul 2023 22:01:03 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
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+$twoYeah, 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/$-1It has no sense for numeric references but with names it can help to avoid repeated expressions.
[Prev in Thread] | Current Thread | [Next in Thread] |