I came across this new org-bars package that shows folding indicators and lines to indicate the groupings. In a forum discussion I also discovered that there’s another package org-visual-outline but it actually requires configuring two packages so I didn’t try it.

However, based on the discussion in the comments it seems that org-bars supports narrowing of the buffer (and it works great) which visual-outline does not. I discovered a visual bug and filed a report, so hopefully it’s an easy fix but it’s not a breaking issue.

Here’s the configuration I’m using based on the recommendations in the documentation.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
;; Org-bars configuration ====================================================
(use-package org-bars
  :after org
  :ensure t
  :custom
 (defun org-no-ellipsis-in-headlines ()
 "Remove use of ellipsis in headlines.
See `buffer-invisibility-spec'."
  (remove-from-invisibility-spec '(outline . t))
  (add-to-invisibility-spec 'outline))
 (add-hook 'org-mode-hook #'org-bars-mode)
 (add-hook 'org-mode-hook 'org-no-ellipsis-in-headlines))

Here’s a screenshot of my Hugo content buffer showing org-bars:

Screenshot of this post inside an Emacs buffers with org-bars drawing vertical lines between each hierarchical node
Org-bars screeshot