Remove calc functions from summary types which don't need them.

This commit is contained in:
James TD Smith 2009-11-11 04:53:17 +00:00 committed by Bernt Hansen
parent a417a36bd2
commit 43e24aa8ed
1 changed files with 20 additions and 21 deletions

View File

@ -712,23 +712,21 @@ around it."
(eval-when-compile (defvar org-columns-time)) (eval-when-compile (defvar org-columns-time))
(defvar org-columns-compile-map (defvar org-columns-compile-map
'(("none" none + identity) '(("none" none +)
(":" add_times + identity) (":" add_times +)
("+" add_numbers + identity) ("+" add_numbers +)
("$" currency + identity) ("$" currency +)
("X" checkbox + identity) ("X" checkbox +)
("X/" checkbox-n-of-m + identity) ("X/" checkbox-n-of-m +)
("X%" checkbox-percent + identity) ("X%" checkbox-percent +)
("max" max_numbers max identity) ("max" max_numbers max)
("min" min_numbers min identity) ("min" min_numbers min)
("mean" mean_numbers ("mean" mean_numbers
(lambda (&rest x) (/ (apply '+ x) (float (length x)))) (lambda (&rest x) (/ (apply '+ x) (float (length x)))))
identity) (":max" max_times max)
(":max" max_times max identity) (":min" min_times min)
(":min" min_times min identity)
(":mean" mean_times (":mean" mean_times
(lambda (&rest x) (/ (apply '+ x) (float (length x)))) (lambda (&rest x) (/ (apply '+ x) (float (length x)))))
identity)
("@min" min_age min (lambda (x) (- org-columns-time x))) ("@min" min_age min (lambda (x) (- org-columns-time x)))
("@max" max_age max (lambda (x) (- org-columns-time x))) ("@max" max_age max (lambda (x) (- org-columns-time x)))
("@mean" mean_age ("@mean" mean_age
@ -739,14 +737,15 @@ Used to compile/uncompile columns format and completing read in
interactive function org-columns-new. interactive function org-columns-new.
operator string used in #+COLUMNS definition describing the operator string used in #+COLUMNS definition describing the
summary type summary type
format symbol describing summary type selected interactively in format symbol describing summary type selected interactively in
org-columns-new and internally in org-columns-new and internally in
org-columns-number-to-string and org-columns-number-to-string and
org-columns-string-to-number org-columns-string-to-number
function called with a list of values as argument to calculate function called with a list of values as argument to calculate
the summary value the summary value
calc function called on every element before summarizing") calc function called on every element before summarizing. This is
optional and should only be specified if needed")
(defun org-columns-new (&optional prop title width op fmt fun &rest rest) (defun org-columns-new (&optional prop title width op fmt fun &rest rest)
"Insert a new column, to the left of the current column." "Insert a new column, to the left of the current column."