org-map-entries: Fix org-agenda-prepare-buffers call
commit44c8cd7136e3fcd1e6bfa08895cac437b7a691fa
authorKyle Meyer <kyle@kyleam.com>
Mon, 10 Aug 2015 16:19:13 +0000 (10 12:19 -0400)
committerKyle Meyer <kyle@kyleam.com>
Mon, 10 Aug 2015 16:19:13 +0000 (10 12:19 -0400)
tree6c7cae74b7d93ccde95a3519c398fd965c11613d
parent07a2d3d6f5cd56b915d413190802ef81988ba260
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.

Like 11e8749, 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.

Reported-by: Robert Klein <roklein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/99779>
lisp/org.el