|
| From: | Mikael Fornius |
| Subject: | [Orgmode] Re: colview min/mean/max |
| Date: | Thu, 21 May 2009 00:42:40 +0200 |
| User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) |
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/org.texi | 6 +++
lisp/org-colview-xemacs.el | 87 +++++++++++++++++++++++++-------------------
lisp/org-colview.el | 87 +++++++++++++++++++++++++-------------------
3 files changed, 104 insertions(+), 76 deletions(-)
I have attached four small patches, one for each file changed and the
last one for all changes.
colview.patch
Description: Text Data
colview-xemacs.patch
Description: Text Data
org-texi.patch
Description: Text Data
colview-full.patch
Description: Text Data
I hope this will be useful. Org-mode is a great mode! -- Mikael Fornius
| [Prev in Thread] | Current Thread | [Next in Thread] |