diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-03-10 21:47:40 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-03-10 21:47:40 +0100 |
commit | cd13b0241d459fae3917ee3327e8e045bef4f4d8 (patch) | |
tree | e3051fbf65d1f0f06bad9c44e5418b94f54f478c | |
parent | 2c454d29139c00f4ecd551943b4df9e16d0f57d6 (diff) | |
download | org-mode-cd13b0241d459fae3917ee3327e8e045bef4f4d8.tar.gz |
org-clock: Fix :scope for clock table
* lisp/org-clock.el (org-dblock-write:clocktable): Test every scope
combination before trying to call a function.
Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-03/msg00034.html>
-rw-r--r-- | lisp/org-clock.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 1d2546c..792f4b8 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -2380,9 +2380,15 @@ the currently selected interval size." (`file-with-archives (and buffer-file-name (org-add-archive-files (list buffer-file-name)))) + ((or `nil `file `subtree `tree + (and (pred symbolp) + (guard (string-match "\\`tree\\([0-9]+\\)\\'" + (symbol-name scope))))) + (or (buffer-file-name (buffer-base-buffer)) + (current-buffer))) ((pred functionp) (funcall scope)) ((pred consp) scope) - (_ (or (buffer-file-name) (current-buffer))))) + (_ (user-error "Unknown scope: %S" scope)))) (block (plist-get params :block)) (ts (plist-get params :tstart)) (te (plist-get params :tend)) |