فهرست منبع

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>
Nicolas Goaziou 6 سال پیش
والد
کامیت
cd13b0241d
1فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      lisp/org-clock.el

+ 7 - 1
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))