diff options
| author | Phillip Lord | 2016-04-30 08:43:39 +0100 |
|---|---|---|
| committer | Phillip Lord | 2016-04-30 14:46:44 +0100 |
| commit | b52ebd4f20ecc3f207a88cf7ac18c745b6e8ef80 (patch) | |
| tree | 3d08e69af7af68d17b1fc1dec0c9374c22898934 | |
| parent | 86aa4094d7f8bb68863759cf109a046f4bad450d (diff) | |
| download | emacs-b52ebd4f20ecc3f207a88cf7ac18c745b6e8ef80.tar.gz emacs-b52ebd4f20ecc3f207a88cf7ac18c745b6e8ef80.zip | |
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.
| -rw-r--r-- | lisp/org/org.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org/org.el b/lisp/org/org.el index 231daa9a6a7..61bcb451d70 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -15069,7 +15069,7 @@ a *different* entry, you cannot use these techniques." | |||
| 15069 | (if (not scope) | 15069 | (if (not scope) |
| 15070 | (progn | 15070 | (progn |
| 15071 | (org-agenda-prepare-buffers | 15071 | (org-agenda-prepare-buffers |
| 15072 | (list (buffer-file-name (current-buffer)))) | 15072 | (and buffer-file-name (list buffer-file-name))) |
| 15073 | (setq res (org-scan-tags func matcher todo-only start-level))) | 15073 | (setq res (org-scan-tags func matcher todo-only start-level))) |
| 15074 | ;; Get the right scope | 15074 | ;; Get the right scope |
| 15075 | (cond | 15075 | (cond |
| @@ -15081,7 +15081,7 @@ a *different* entry, you cannot use these techniques." | |||
| 15081 | (setq scope (org-agenda-files t)) | 15081 | (setq scope (org-agenda-files t)) |
| 15082 | (setq scope (org-add-archive-files scope))) | 15082 | (setq scope (org-add-archive-files scope))) |
| 15083 | ((eq scope 'file) | 15083 | ((eq scope 'file) |
| 15084 | (setq scope (list (buffer-file-name)))) | 15084 | (setq scope (and buffer-file-name (list buffer-file-name)))) |
| 15085 | ((eq scope 'file-with-archives) | 15085 | ((eq scope 'file-with-archives) |
| 15086 | (setq scope (org-add-archive-files (list (buffer-file-name)))))) | 15086 | (setq scope (org-add-archive-files (list (buffer-file-name)))))) |
| 15087 | (org-agenda-prepare-buffers scope) | 15087 | (org-agenda-prepare-buffers scope) |