Column View: Implement new operators
commit11a7656069f8e889ef56b948c820e869ef4554a9
authorCarsten Dominik <carsten.dominik@gmail.com>
Thu, 21 May 2009 05:54:54 +0000 (21 07:54 +0200)
committerCarsten Dominik <carsten.dominik@gmail.com>
Thu, 21 May 2009 05:56:55 +0000 (21 07:56 +0200)
treec70b1d6702c2d06eecfb77e4f9d07ad279375587
parent529ff7f2c027fe90749e1e2cdefae474765cea45
Column View: Implement new operators

Mikael Fornius writes:

> This is my suggestion of an implementation of min/mean/max computation
> in columnview summaries. If you like it feel free to use it.
>
> New operators: {min}, {max} and {mean} possibly prefixed with : for use
> with timevalues.
>
> Example from my running exercise diary:
>
> #+COLUMNS: %DISTANCE{+;%.1f} %HEARTRATE{mean;%.1f} %SPEED{:min} %CALORIES{+}
>
> Gives a colview with summaries:
>
> total distance, mean heartrate, fastest speed (min/km) and total
> calories.
>
> I have tested it on emacs-23 and it works well for me now, also with the
> interactive colview functions.
>
> But you never know really. ;-) Anyway, there should not be any emacs-23
> specific elisp code added afik.
>
> (Because I do not use xemacs I have not tested it with xemacs but the
> small changes I made should be compitable to both xemacs and emacs. I
> would appreciate if someone on this list who uses xemacs will give it a
> try for me. Thanks!)
>
> (This fix also opens up for using user defined lisp functions to
> calculate colview summaries, but I am not sure if that is something
> useful. Like this:
>
> (defun std (&rest values)
>  "Compute standard deviation."
>  ...)
>
> #+COLUMNS: %DATA{eval:std}
>
> If someone finds this attractive it would now be easy to implement as well.)
>
doc/ChangeLog
doc/org.texi
lisp/ChangeLog
lisp/org-colview-xemacs.el
lisp/org-colview.el