diff --git a/lisp/org.el b/lisp/org.el index b974e6c5f..20d441478 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6076,8 +6076,8 @@ With a numeric prefix, show all headlines up to that level." (interactive) (let (org-show-entry-below state) (save-excursion - (goto-char (point-max)) - (while (re-search-backward + (goto-char (point-min)) + (while (re-search-forward "^[ \t]*:VISIBILITY:[ \t]+\\([a-z]+\\)" nil t) (setq state (match-string 1))