* [PATCH] Adds function form evaluation parameter for the clocktable scope
@ 2016-12-16 14:32 Eduardo Bellani
0 siblings, 0 replies; only message in thread
From: Eduardo Bellani @ 2016-12-16 14:32 UTC (permalink / raw)
To: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]
org-clock.el: Adds function form evaluation parameter for the clocktable scope
* lisp/org-clock.el (org-dblock-write:clocktable): Make sure to
evaluate the function form passed as the scope for the clocktable.
* doc/org.texi: Document the feature of using a function form as the
scope for the clocktable.
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.
Also adds this feature the the manual.
---
doc/org.texi | 1 +
lisp/org-clock.el | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/doc/org.texi b/doc/org.texi
index 6be76d8..fb88827 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6638,6 +6638,7 @@ be selected:
tree @r{the surrounding level 1 tree}
agenda @r{all agenda files}
("file"..) @r{scan these files}
+ (symbol "argument1" ...) @r{scan the files returned by evaluating the function form}
file-with-archives @r{current file and its archives}
agenda-with-archives @r{all agenda files, including archives}
:block @r{The time block to consider. This block is specified either}
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 65c13fd..3ccd309 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2370,7 +2370,9 @@ 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)))))
+ (apply (car scope) (cdr 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] only message in thread
only message in thread, other threads:[~2016-12-16 14:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-16 14:32 [PATCH] Adds function form evaluation parameter for the clocktable scope Eduardo Bellani
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).