Julien Cubizolles <j.cubizol...@free.fr> writes:

> According to the manual
> (https://orgmode.org/manual/Advanced-features.html), named fields in
> formula should be referred to by $name when a formula is assigned to
> them
>
>> ‘^’ This row defines names for the fields above the row. With such a
>> definition, any formula in the table may use ‘$m1’ to refer to the
>> value ‘10’. Also, if you assign a formula to a names field, it is
>> stored as ‘$name = ...’.
>
> However with 'C-u C-c =' in a named field, the prompt doesn't
> include the '$' for the name and the formula then defined doesn't work.

Confirmed.

Steps to reproduce:

1. Crete table

|   | 1 | 5 |
| ^ | a | b |

2. Move point to "5"
3. C-u C-c =
4. b=1
5. Observe
   #+TBLFM: b=1

Should be
#+TBLFM: $b=1

Observations:
1. org-table-get-stored-formulas returns (("b" . 1)) from $+TBLFM: $b=1
   Note how $ is stripped
2. org-table-store-formulas simply writes "b" as is, without adding "$"

These things are a bit fragile. One needs to carefully consider how to
solve the bug and not break org-table along the way.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to