Add function to show just every headline in buffer

* lisp/org.el (org-show-branches-buffer): New function.
This commit is contained in:
Marco Wahl 2019-07-11 12:12:37 +02:00
parent add2614cf9
commit ee4fcc2aaa
1 changed files with 10 additions and 0 deletions

View File

@ -17917,6 +17917,16 @@ Move point to the beginning of first heading or end of buffer."
(unless (bobp)
(org-flag-region 1 (1- (point)) (not arg) 'outline)))
(defun org-show-branches-buffer ()
"Show all branches in the buffer."
(org-flag-above-first-heading)
(outline-hide-sublevels 1)
(unless (eobp)
(outline-show-branches)
(while (outline-get-next-sibling)
(outline-show-branches)))
(goto-char (point-min)))
(defun org-kill-note-or-show-branches ()
"Abort storing current note, or call `outline-show-branches'."
(interactive)