From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gunnar Wolf Subject: Re: Tables for attendance lists - A problem understanding TBLFM? Date: Tue, 9 Apr 2013 10:31:50 -0500 Message-ID: <20130409153150.GE115357@gwolf.org> References: <20130408235753.GC109669@gwolf.org> <20130409002519.GA3195@kuru.dyndns-at-home.com> <20130409022123.GD112475@gwolf.org> <20130409145509.GC115357@gwolf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPaWo-0005cA-2J for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 11:33:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPaWW-0007sw-0t for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 11:32:09 -0400 Received: from lafa.iiec.unam.mx ([132.248.72.141]:35907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPaWV-0007sL-NK for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 11:31:51 -0400 Content-Disposition: inline In-Reply-To: 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: Nick Dokos Cc: emacs-orgmode@gnu.org (Quoting in full to preserve mail readability without resorting to too much context) > > > #+CAPTION: Attendances for April > > > |---------+-------------------+---+---+---+---+----+-------| > > > | Account | Name | 1 | 3 | 5 | 8 | 10 | Total | > > > |---------+-------------------+---+---+---+---+----+-------| > > > | 1234 | C=C3=A1rdenas, L=C3=A1zaro | X | | X | X | | = 3 | > > > | 5678 | Madero, Francisco | X | X | X | X | | 4 | > > > | 1544 | Villa, Pancho | | | | | | 0 | > > > | 0113 | Zapata, Emiliano | | X | X | | | 2 | > > > |---------+-------------------+---+---+---+---+----+-------| > > > #+tblfm: @II+1$>..@III-1$>=3D'(length (delq "" '($<<<..$>>))) > > > > Interesting, my org-mode version behaves differently, and still gives > > '1' for the empty row with your version: > > > > Substitution history of formula > > (...) > > @r$c-> '(length (delq "" '("0"))) > > $1-> '(length (delq "" '("0"))) > > Result: 1 > > > Check the formula again: you seem to have captured the 0 from the last > column, instead of stopping at the penultimate column. The range should > be $3..$>> or $<<<..$>> - also, you should have posted the whole > substitution history so we could see the range, instead of me guessing.= The > motto should be "More information is better than less", but of course t= hat > should be tempered by common sense :-) Trying with: #+tblfm: @II+1$>..@III-1$>=3D'(length(delq "" '($3..$>>))) The full substitution history is: Substitution history of formula Orig: '(length(delq "" '($3..$7))) $xyz-> '(length(delq "" '($3..$7))) @r$c-> '(length(delq "" '("0"))) $1-> '(length(delq "" '("0"))) Result: 1 Format: NONE Final: 1 Changing the $3 for $<<< yields the exact same result. I cannot see any "0" - As far as I can understand, the evaluation of an empty vector for (length ...) gives this "0" ?