mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-22 07:09:47 +00:00
org-clock: Fix org-agenda-prepare-buffers call
* lisp/org-clock.el (org-dblock-write:clocktable): Pass buffer to org-agenda-prepare-buffers when buffer is not visiting file. This surfaced as an error when 05efa7a ("Backport commit 3a5f751 from Emacs master branch", 2015-08-08) replaced a '(while (setq VAR (pop LIST)) BODY)' with '(dolist (VAR LIST) BODY)', resulting in the body being executed when '(nil)' was passed to org-agenda-prepare-buffers.
This commit is contained in:
parent
04aea5ea6f
commit
11e8749102
@ -2419,7 +2419,8 @@ the currently selected interval size."
|
||||
;; Just from the current file
|
||||
(save-restriction
|
||||
;; get the right range into the restriction
|
||||
(org-agenda-prepare-buffers (list (buffer-file-name)))
|
||||
(org-agenda-prepare-buffers (list (or (buffer-file-name)
|
||||
(current-buffer))))
|
||||
(cond
|
||||
((not scope)) ; use the restriction as it is now
|
||||
((eq scope 'file) (widen))
|
||||
|
Loading…
Reference in New Issue
Block a user