>From ee4fcc2aaa54d81fe3d5c49f203c41f13589b43f Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Thu, 11 Jul 2019 12:12:37 +0200 Subject: [PATCH 2/4] Add function to show just every headline in buffer * lisp/org.el (org-show-branches-buffer): New function. --- lisp/org.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 3326aa542..e6117dcdf 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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) -- 2.22.0