Browse Source

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.
Kyle Meyer 9 years ago
parent
commit
408f6da74d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org-clock.el

+ 2 - 1
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