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.
This commit is contained in:
Kyle Meyer 2015-08-10 12:19:39 -04:00
parent 44c8cd7136
commit 408f6da74d
1 changed files with 2 additions and 1 deletions

View File

@ -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