emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tables for attendance lists - A problem understanding TBLFM?


From: Nick Dokos
Subject: Re: [O] Tables for attendance lists - A problem understanding TBLFM?
Date: Tue, 9 Apr 2013 11:10:13 -0400


On Tue, Apr 9, 2013 at 10:55 AM, Gunnar Wolf <address@hidden> wrote:
> Try this:
>
> #+CAPTION: Attendances for April
> |---------+-------------------+---+---+---+---+----+-------|
> | Account | Name              | 1 | 3 | 5 | 8 | 10 | Total |
> |---------+-------------------+---+---+---+---+----+-------|
> |    1234 | Cárdenas, Lázaro  | 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$>address@hidden>='(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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]