Hi Michael, this is just great! Thanks a lot for this major enhancement, and for your details explanations and tests.
Michael Brand <michael.ch.br...@gmail.com> writes: > Patch 6 of the attached patches makes it possible to write > spreadsheet Calc formulas that check for empty fields: To sum the > first two columns unless one or both empty: > $3 = if("$1" = "nan" || "$2" = "nan", string(""), $1 + $2); E > > The other patches: > > - patch 1: testing/README: add howto run ERT partially Nice. > - patch 2: Add ERT for table alignment within Org buffer > > The new function org-test-table-target-expect is to simplify writing > spreadsheet ERT by providing just a target table to apply the formula > to, the expected result table and the table formula with optionally > additional variants. The variants typically are to check the same > result with a Lisp formula and a Calc formula. test-org-table.el is > also a howto example collection as a user documentation. > > - patch 3: Extend org-table-number-regexp > > - patch 4: Add ERTs for basic spreadsheet functionality > > My plan is to add spreadsheet examples only to Org ERT > (test-org-table.el) from now on and someday to move those I already > made on Worg. > > - patch 5: org-table.el: Fix range len bugs and inconsistencies > > 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. > > Note: Org ERT passes after every single patch to document the behavior > of each patch. > > After the review is complete please make sure that “make check” passes > before applying the patches and also before git push. I hope I got it > right with the require to resolve the dependencies. make => fine make single => fine make test => all 339 tests passed I pushed the 6 commits to master. Thanks, -- Bastien