org-map-entries: Fix org-agenda-prepare-buffers call
* lisp/org.el (org-map-entries): Check that buffer-file-name is non-nil before passing to org-agenda-prepare-buffers. This is a backport of commit 44c8cd7136e3fcd1e6bfa08895cac437b7a691fa from upstream org-mode. Addresses bug #23365.
This commit is contained in:
parent
86aa4094d7
commit
b52ebd4f20
1 changed files with 2 additions and 2 deletions
|
@ -15069,7 +15069,7 @@ a *different* entry, you cannot use these techniques."
|
|||
(if (not scope)
|
||||
(progn
|
||||
(org-agenda-prepare-buffers
|
||||
(list (buffer-file-name (current-buffer))))
|
||||
(and buffer-file-name (list buffer-file-name)))
|
||||
(setq res (org-scan-tags func matcher todo-only start-level)))
|
||||
;; Get the right scope
|
||||
(cond
|
||||
|
@ -15081,7 +15081,7 @@ a *different* entry, you cannot use these techniques."
|
|||
(setq scope (org-agenda-files t))
|
||||
(setq scope (org-add-archive-files scope)))
|
||||
((eq scope 'file)
|
||||
(setq scope (list (buffer-file-name))))
|
||||
(setq scope (and buffer-file-name (list buffer-file-name))))
|
||||
((eq scope 'file-with-archives)
|
||||
(setq scope (org-add-archive-files (list (buffer-file-name))))))
|
||||
(org-agenda-prepare-buffers scope)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue