From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Tables for attendance lists - A problem understanding TBLFM? Date: Tue, 9 Apr 2013 11:10:13 -0400 Message-ID: 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: multipart/alternative; boundary=14dae934123d3cfd0104d9eef313 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPaBi-0003ud-8L for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 11:10:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPaBZ-0007CJ-TN for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 11:10:22 -0400 Received: from mail-ia0-x235.google.com ([2607:f8b0:4001:c02::235]:61268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPaBZ-0007C6-MQ for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 11:10:13 -0400 Received: by mail-ia0-f181.google.com with SMTP id o25so6428339iad.12 for ; Tue, 09 Apr 2013 08:10:13 -0700 (PDT) In-Reply-To: <20130409145509.GC115357@gwolf.org> 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: Gunnar Wolf Cc: emacs-orgmode@gnu.org --14dae934123d3cfd0104d9eef313 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Apr 9, 2013 at 10:55 AM, Gunnar Wolf wrote: > > > Try this: > > > > #+CAPTION: Attendances for April > > |---------+-------------------+---+---+---+---+----+-------| > > | Account | Name | 1 | 3 | 5 | 8 | 10 | Total | > > |---------+-------------------+---+---+---+---+----+-------| > > | 1234 | C=E1rdenas, L=E1zaro | 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 that should be tempered by common sense :-) HTH, Nick --14dae934123d3cfd0104d9eef313 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Tue, Apr 9, 2013 at 10:55 AM,= Gunnar Wolf <gwolf@gwolf.org> wrote:
> Try this:
>
> #+CAPTION: Attendances for April
> |---------+-------------------+---+---+---+---+----+-------|
> | Account | Name =A0 =A0 =A0 =A0 =A0 =A0 =A0| 1 | 3 | 5 | 8 | 10 | Tot= al |
> |---------+-------------------+---+---+---+---+----+-------|
> | =A0 =A01234 | C=E1rdenas, L=E1zaro =A0| X | =A0 | X | X | =A0 =A0| = =A0 =A0 3 |
> | =A0 =A05678 | Madero, Francisco | X | X | X | X | =A0 =A0| =A0 =A0 4= |
> | =A0 =A01544 | Villa, Pancho =A0 =A0 | =A0 | =A0 | =A0 | =A0 | =A0 = =A0| =A0 =A0 0 |
> | =A0 =A00113 | Zapata, Emiliano =A0| =A0 | X | X | =A0 | =A0 =A0| =A0= =A0 2 |
> |---------+-------------------+---+---+---+---+----+-------|
> #+tblfm: @II+1$>..@III-1$>=3D'(length (delq "" = 9;($<<<..$>>)))

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-> =A0 '(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 $<<<..$>> =A0- also, you should have posted the = whole substitution history so we could see the range, instead of me guessin= g. The motto should be "More information is better than less", bu= t of course that should be tempered by common sense :-)

HTH,
Nick

--14dae934123d3cfd0104d9eef313--