summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2011-08-18 09:00:20 +0200
committerBastien Guerry <bzg@altern.org>2011-08-18 09:00:20 +0200
commit9f337ee06caab6998a0ce6734b27afda2dbc36d7 (patch)
treeec3283ccf709921d0df59378152e93da6266509f
parent2edd05eaac6c62ce76572c469415602e6de94cda (diff)
downloadorg-mode-9f337ee06caab6998a0ce6734b27afda2dbc36d7.tar.gz
org-clock.el: remove `org-clocktable-sort-clock-data'.
This function by Max Mikhanosha was added accidently. We are waiting for the FSF to process Max copyright assignement to get this function in org-mode. Thanks to Achim Gratz for spotting at this.
-rw-r--r--lisp/org-clock.el47
1 files changed, 5 insertions, 42 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 7c5182c..4138b96 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2038,7 +2038,8 @@ the currently selected interval size."
(encode-time 0 0 0 (+ d n) m y))))
((and wp (string-match "w\\|W" wp) mw (> (length wp) 0))
(require 'cal-iso)
- (setq date (calendar-gregorian-from-absolute (calendar-absolute-from-iso (list (+ mw n) 1 y))))
+ (setq date (calendar-gregorian-from-absolute
+ (calendar-absolute-from-iso (list (+ mw n) 1 y))))
(setq ins (format-time-string
"%G-W%V"
(encode-time 0 0 0 (nth 1 date) (car date) (nth 2 date)))))
@@ -2054,7 +2055,8 @@ the currently selected interval size."
(setq mw 5
y (- y 1))
())
- (setq date (calendar-gregorian-from-absolute (calendar-absolute-from-iso (org-quarter-to-date (+ mw n) y))))
+ (setq date (calendar-gregorian-from-absolute
+ (calendar-absolute-from-iso (org-quarter-to-date (+ mw n) y))))
(setq ins (format-time-string
(concatenate 'string (number-to-string y) "-Q" (number-to-string (+ mw n)))
(encode-time 0 0 0 (nth 1 date) (car date) (nth 2 date)))))
@@ -2073,44 +2075,6 @@ the currently selected interval size."
(org-update-dblock)
t)))))
-(defun org-clocktable-sort-clock-data (tables params)
- "TABLES is a list of tables with clocking data as produced by
-`org-clock-get-table-data'. PARAMS is the parameter property
-list obtained from the dynamic block defintion.
-
-When PARAMS contains a :SORT entry, sort the tables and the entries
-inside them accordnly:
-
-:SORT time-up or T, sorts by most time spent on top
-:SORT time-down, sorts by least time spent on top
-
-Returns the sorted table list"
- (let ((sort (plist-get params :sort)))
- (if (not sort) tables
- (sort (mapcar
- (lambda (table)
- (list (nth 0 table)
- (nth 1 table)
- (sort
- (third table)
- (lambda (elem1 elem2)
- (let ((d1 (nth 3 elem1))
- (d2 (nth 3 elem2)))
- (cond ((memq sort '(t time-up))
- (> d1 d2))
- ((eq sort 'time-down)
- (< d1 d2))
- (t (error "Invalid :sort parameter %s" sort))))))))
- tables)
- (lambda (table1 table2)
- (let ((d1 (nth 1 table1))
- (d2 (nth 1 table2)))
- (cond ((memq sort '(t time-up))
- (> d1 d2))
- ((eq sort 'time-down)
- (< d1 d2))
- (t (error "Invalid :sort parameter %s" sort)))))))))
-
(defun org-dblock-write:clocktable (params)
"Write the standard clocktable."
(setq params (org-combine-plists org-clocktable-defaults params))
@@ -2196,8 +2160,7 @@ Returns the sorted table list"
(setq params (plist-put params :one-file-with-archives
one-file-with-archives))
- (funcall formatter ipos
- (org-clocktable-sort-clock-data tbls params) params))))
+ (funcall formatter ipos tbls params))))
(defun org-clocktable-write-default (ipos tables params)
"Write out a clock table at position IPOS in the current buffer.