Function: org-clock-get-clocktable
org-clock-get-clocktable is an autoloaded and byte-compiled function
defined in org-clock.el.gz.
Signature
(org-clock-get-clocktable &rest PROPS)
Documentation
Get a formatted clocktable with parameters according to PROPS.
The table is created in a temporary buffer, fully formatted and fontified, and then returned.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-clock.el.gz
;;;###autoload
(defun org-clock-get-clocktable (&rest props)
"Get a formatted clocktable with parameters according to PROPS.
The table is created in a temporary buffer, fully formatted and
fontified, and then returned."
;; Set the defaults
(setq props (plist-put props :name "clocktable"))
(unless (plist-member props :maxlevel)
(setq props (plist-put props :maxlevel 2)))
(unless (plist-member props :scope)
(setq props (plist-put props :scope 'agenda)))
(with-temp-buffer
(org-mode)
(org-create-dblock props)
(org-update-dblock)
(font-lock-ensure)
(forward-line 2)
(buffer-substring (point) (progn
(re-search-forward "^[ \t]*#\\+END" nil t)
(line-beginning-position)))))