From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Distinguish between blank and zero in org-mode spreadsheet Date: Sat, 29 Dec 2012 14:39:07 +0100 Message-ID: <87obhdf05g.fsf@bzg.ath.cx> References: <87r4mxv7l8.fsf@googlemail.com> <5596.1355206238@alphaville> <87ehirekir.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Towd5-0000ya-At for emacs-orgmode@gnu.org; Sat, 29 Dec 2012 08:39:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Towd4-0004JN-9I for emacs-orgmode@gnu.org; Sat, 29 Dec 2012 08:39:11 -0500 Received: from mail-wi0-f176.google.com ([209.85.212.176]:49202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Towd4-0004JD-2z for emacs-orgmode@gnu.org; Sat, 29 Dec 2012 08:39:10 -0500 Received: by mail-wi0-f176.google.com with SMTP id hm6so8682709wib.3 for ; Sat, 29 Dec 2012 05:39:09 -0800 (PST) In-Reply-To: (Michael Brand's message of "Fri, 28 Dec 2012 15:10:22 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Brand Cc: Bob Newell , Thorsten Jolitz , Nick Dokos , Org Mode Hi Michael, this is just great! Thanks a lot for this major enhancement, and for your details explanations and tests. Michael Brand 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