From 408f6da74de49fa4dfa4e0d7b7cecf22dd5ef890 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 10 Aug 2015 12:19:39 -0400 Subject: [PATCH] org-clock: Fix org-add-archive-files call * lisp/org-clock.el (org-dblock-write:clocktable): Check that buffer-file-name is non-nil before passing to org-add-archive-files. --- 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 332ea3c95..e44da734f 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -2403,7 +2403,8 @@ the currently selected interval size." (setq scope (org-agenda-files t)) (setq scope (org-add-archive-files scope))) ((eq scope 'file-with-archives) - (setq scope (org-add-archive-files (list (buffer-file-name))) + (setq scope (and buffer-file-name + (org-add-archive-files (list buffer-file-name))) one-file-with-archives t))) (setq scope-is-list (and scope (listp scope))) (if scope-is-list