Keep table row/column removal from creating invalid formulas
commite91f6db1e3ddae0f0db035eaf4699e423308476f
authorCarsten Dominik <carsten.dominik@gmail.com>
Thu, 25 Aug 2011 06:16:00 +0000 (25 08:16 +0200)
committerCarsten Dominik <carsten.dominik@gmail.com>
Thu, 25 Aug 2011 06:16:00 +0000 (25 08:16 +0200)
treec8f631492652b2592c19bc5c75e016e2675c1100
parent984318cea532b61fcf1afb6fc6f3970a0a4de2c0
Keep table row/column removal from creating invalid formulas

* lisp/org-table.el (org-table-fix-formulas): Throw error when changing
formula leads to an invalid formula.

This fix catches at least one case, the one described by Nicolas:

> | 1 | 2 | 3 |
> | 1 | 2 | 3 |
> #+TBLFM: @2$1..@2$3=@1
> If I remove the second column (M-S-Left), the formula is correctly
> updated. But when I remove the last column, the formula gets partly
> deleted and becomes:
>
>                            #+TBLFM: @2$1..
>
lisp/org-table.el