From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Bellani Subject: [PATCH] Fix clocktable scope parameter Date: Thu, 15 Dec 2016 13:02:11 -0200 Message-ID: <8760ml2q30.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHXZU-0001xU-2M for emacs-orgmode@gnu.org; Thu, 15 Dec 2016 10:03:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHXZP-0004pZ-3o for emacs-orgmode@gnu.org; Thu, 15 Dec 2016 10:03:48 -0500 Received: from mail-ua0-f194.google.com ([209.85.217.194]:34207) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHXZP-0004e3-02 for emacs-orgmode@gnu.org; Thu, 15 Dec 2016 10:03:43 -0500 Received: by mail-ua0-f194.google.com with SMTP id b35so1073189uaa.1 for ; Thu, 15 Dec 2016 07:03:20 -0800 (PST) Received: from personal ([187.65.220.63]) by smtp.gmail.com with ESMTPSA id x124sm554651vkc.1.2016.12.15.07.02.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2016 07:02:17 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlhSsHMACgkQSbLl0kCTjGk4bgCgg6RIj03zKBSsBOAettfZXwxw pDgAnjHnBgDyBcVBWJmlLIhNB3MNOQNs =EQ5S -----END PGP SIGNATURE----- --=-=-=--