org-table.el: Fix range len bugs and inconsistencies
commit764315b3fce26de59189b957a8049e299209043a
authorMichael Brand <michael.ch.brand@gmail.com>
Fri, 28 Dec 2012 14:02:01 +0000 (28 15:02 +0100)
committerBastien Guerry <bzg@altern.org>
Sat, 29 Dec 2012 13:33:52 +0000 (29 14:33 +0100)
tree303f07d4783d19fb626ace9542f2947010738a63
parentf5dd9a8a7a909708b6612c41af544fcee4a123aa
org-table.el: Fix range len bugs and inconsistencies

* lisp/org-table.el (org-table-eval-formula): Keep empty fields during
preprocessing.
(org-table-make-reference): A range with only empty fields should not
always return 0 but also empty string, consistent with field reference
of an empty field.  Use future design for nan but replicate current
behavior.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.

The range len bugs may lead to wrong calculations for range references
with empty fields when the range len is relevant.  Affects typically
Calc vmean on simple range and without format specifier EN.  Also
Lisp with e. g. `length' on simple range or with L.
lisp/org-table.el
testing/lisp/test-org-table.el