Fix `org-map-tree' when called in an invisible heading

* lisp/org.el (org-map-tree): Move to closest heading above even if it
  is invisible.

Suggested-by: talwrii talwrii <talwrii@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/108590>
This commit is contained in:
Nicolas Goaziou 2016-07-31 00:20:35 +02:00
parent 406ad6eb52
commit 9798da77b2
1 changed files with 1 additions and 1 deletions

View File

@ -8406,7 +8406,7 @@ After top level, it switches back to sibling level."
(defun org-map-tree (fun)
"Call FUN for every heading underneath the current one."
(org-back-to-heading)
(org-back-to-heading t)
(let ((level (funcall outline-level)))
(save-excursion
(funcall fun)