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

2013-04-14 Thread Michael Brand
Hi Bastien On Tue, Apr 9, 2013 at 7:06 PM, Bastien b...@gnu.org wrote: It is worth a small compatibility change: For a range with only empty fields it is now possible and necessary to choose different behaviors of vmean by adding the format specifiers E and/or N. I'll add this in the release

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

2013-04-14 Thread Bastien
Hi Michael, Michael Brand michael.ch.br...@gmail.com writes: But in the release notes I would generally, not particularly because of the above, write: If empty fields are of interest it is recommended to reread the section 3.5.2 Formula syntax for Calc of the manual because the description

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

2013-04-14 Thread Michael Brand
Hi Bastien On Sun, Apr 14, 2013 at 12:11 PM, Bastien b...@gnu.org wrote: PS: you can use .patch as the extension for the patches, Emacs reads them using diff-mode and our .gitignore will DTRT here. Yes, but I do this hack of .patch.txt as a workaround to get the right email Content-Type:

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

2013-04-14 Thread Bastien
Michael Brand michael.ch.br...@gmail.com writes: Yes, but I do this hack of .patch.txt as a workaround to get the right email Content-Type: text/plain when attaching with the web interface of Google Gmail. There .patch or .diff results in Content-Type: application/octet-stream which has to be

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

2013-04-11 Thread Michael Brand
Hi Bastien On Tue, Apr 9, 2013 at 7:06 PM, Bastien b...@gnu.org wrote: Maybe you could add a footnote in the manual for this? I plan to update some paragraphs of org.texi regarding empty fields during the next days. Michael

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

2013-04-09 Thread Michael Brand
On Tue, Apr 9, 2013 at 5:31 AM, Nick Dokos ndo...@gmail.com wrote: You can turn on formula debugging with C-c { and then you'd see that in Pancho's case, the list is () i.e. a list containing the empty string - a list of length 1. That might qualify as a bug (or not) This issue is part of some

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

2013-04-09 Thread Michael Brand
Hi Gunnar On Tue, Apr 9, 2013 at 1:57 AM, Gunnar Wolf gw...@gwolf.org wrote: #+tblfm: @2$8..@5$8='(length '($3..$7))::@6$2=vmean($3..$7);%.2f::@6$3..@6$7='(length '(@2..@5))::@6$8=vmean(@2..@5);%.2f I would use #+TBLFM: $8 = vlen($3..$7) :: @$2 = vmean($3..$7); E %.2f :: @$3..@$7 =

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

2013-04-09 Thread Gunnar Wolf
Nick Dokos dijo [Mon, Apr 08, 2013 at 11:31:14PM -0400]: You can turn on formula debugging with C-c { and then you'd see that in Pancho's case, the list is () i.e. a list containing the empty string - a list of length 1. That might qualify as a bug (or not) but you can easily work around

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

2013-04-09 Thread Nick Dokos
On Tue, Apr 9, 2013 at 10:55 AM, Gunnar Wolf gw...@gwolf.org wrote: Try this: #+CAPTION: Attendances for April |-+---+---+---+---+---++---| | Account | Name | 1 | 3 | 5 | 8 | 10 | Total |

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

2013-04-09 Thread Gunnar Wolf
Michael Brand dijo [Tue, Apr 09, 2013 at 02:40:06PM +0200]: On Tue, Apr 9, 2013 at 5:31 AM, Nick Dokos ndo...@gmail.com wrote: You can turn on formula debugging with C-c { and then you'd see that in Pancho's case, the list is () i.e. a list containing the empty string - a list of length 1.

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

2013-04-09 Thread Gunnar Wolf
(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 |

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

2013-04-09 Thread Michael Brand
On Tue, Apr 9, 2013 at 5:10 PM, Nick Dokos ndo...@gmail.com wrote: @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

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

2013-04-09 Thread Michael Brand
Trying to adapt your workaround with delq to '(0) lets me give up, also after reading the docstring of delq. Hope you or so can help. How could I miss the here not so obvious difference between eq and equal: (delete 0 [...]) works of course. Michael

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

2013-04-09 Thread Nick Dokos
Ah, OK - I guess Gunnar will not be able to avoid an upgrade to something more recent. And yes, the eq/equal subtleties strike once again: (eq ) t (eq 0 0) nil (equal 0 0) t

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

2013-04-09 Thread Gunnar Wolf
Nick Dokos dijo [Tue, Apr 09, 2013 at 12:03:33PM -0400]: Ah, OK - I guess Gunnar will not be able to avoid an upgrade to something more recent. And yes, the eq/equal subtleties strike once again: (eq ) t (eq 0 0) nil (equal 0 0) t Yay - Thanks to you all :-) Yes, it finally works

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

2013-04-09 Thread Bastien
Hi Michael, Michael Brand michael.ch.br...@gmail.com writes: This issue is part of some old bugs that I discovered end of 2012. It seems like my patch from then http://orgmode.org/w/org-mode.git?p=org-mode.git;a=commitdiff;h=764315 resolved it only partially and I missed the case of a range

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

2013-04-08 Thread Gunnar Wolf
Hi, As mostly everything for my class work is handled through org-mode, I am trying to use it also for tracking attendance. And it almost works (given my quite-probably-wrong way to solve it) — Can you help me pinpoint what am I doing wrong? In case it's not obvious, I'm a complete Lisp newbie.

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

2013-04-08 Thread Suvayu Ali
On Mon, Apr 08, 2013 at 06:57:53PM -0500, Gunnar Wolf wrote: #+CAPTION: Attendances for April |-+---+---+---+---+---++---| | Account | Name | 1 | 3 | 5 | 8 | 10 | Total | |-+---+---+---+---+---++---| |1234 |

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

2013-04-08 Thread Gunnar Wolf
Suvayu Ali dijo [Tue, Apr 09, 2013 at 02:25:19AM +0200]: On Mon, Apr 08, 2013 at 06:57:53PM -0500, Gunnar Wolf wrote: #+CAPTION: Attendances for April |-+---+---+---+---+---++---| | Account | Name | 1 | 3 | 5 | 8 | 10 | Total |

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

2013-04-08 Thread Nick Dokos
On Mon, Apr 8, 2013 at 10:21 PM, Gunnar Wolf gw...@gwolf.org wrote: Suvayu Ali dijo [Tue, Apr 09, 2013 at 02:25:19AM +0200]: On Mon, Apr 08, 2013 at 06:57:53PM -0500, Gunnar Wolf wrote: #+CAPTION: Attendances for April |-+---+---+---+---+---++---| |

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

2013-04-08 Thread Nick Dokos
...the $3 seemed better than $ though so I kept it) Bah, humbug: I pasted the $ version, instead of the $3 version.