emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix clocktable scope parameter
@ 2016-12-15 15:02 Eduardo Bellani
  2016-12-15 15:10 ` Nicolas Goaziou
  0 siblings, 1 reply; 14+ messages in thread
From: Eduardo Bellani @ 2016-12-15 15:02 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]


org-clock.el: Fix clocktable scope parameter

* lisp/org-clock.el (org-dblock-write:clocktable): Make sure to eval
  the scope if it is a lisp expression, or to return the scope if it
  is just a list.

This adds back to the clocktable the capacity to have as scope both a
list of file paths or a function that returns such a list.

---
 lisp/org-clock.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 65c13fd..18bb443 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2370,7 +2370,8 @@ the currently selected interval size."
 		    (`file-with-archives
 		     (and buffer-file-name
 			  (org-add-archive-files (list buffer-file-name))))
-		    ((pred consp) scope)
+                    ((and (pred #'listp) (pred (lambda (scope) (symbolp (car scope))))) (eval scope))
+                    ((pred listp) scope)
 		    (_ (or (buffer-file-name) (current-buffer)))))
 	   (block (plist-get params :block))
 	   (ts (plist-get params :tstart))
--

TINYCHANGE

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-03-05 10:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-15 15:02 [PATCH] Fix clocktable scope parameter Eduardo Bellani
2016-12-15 15:10 ` Nicolas Goaziou
2016-12-15 15:31   ` Eduardo Bellani
2016-12-15 16:04   ` Eduardo Bellani
2016-12-15 18:04     ` Thomas S. Dye
2016-12-15 19:16       ` Eduardo Bellani
2016-12-15 20:56         ` Nicolas Goaziou
2016-12-15 23:37           ` Eduardo Bellani
2016-12-16 21:11             ` Nicolas Goaziou
2016-12-16 22:30               ` Eduardo Bellani
2016-12-16 23:22                 ` Nicolas Goaziou
2017-03-04 22:03                   ` Eduardo Bellani
2017-03-05 10:54                     ` Nicolas Goaziou
2016-12-15 19:48       ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).