Browse Source

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>
Nicolas Goaziou 8 years ago
parent
commit
9798da77b2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -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)