How can you keep a heading's main content always visible in org-mode?
Perhaps a property that can be set, so that
S-tab never collapses it? (Not keeping the children's contents visible, unless they are also set the same way, not impacting e.g. narrowing etc.)
which-function-mode normally displays the name of the function the point is currently in for languages like C and Python. But in
org-mode it treats the current headline as the "function" name to display.
Turn it on temporarily with
M-x which-function-mode or permanently for all
org-mode files with
(add-to-hook 'org-mode-hook #'which-function-mode) in your
By default this displays the name in the
mode-line at the bottom of the buffer. I find it gets a little crowded down there, so I add it and the buffer name to the header instead:
(defun header-buffer-name () (let ( (props (if (powerline-selected-window-active) '(:box "grey80" :background "grey50" :foreground "black") '(:box "grey80" ))) ) (propertize (buffer-name) 'font-lock-face props) )) (defun header-function-name () (let ( (props (if (powerline-selected-window-active) '(:box "Gold1" :background "goldenrod" :foreground "black") '(:box "Gold1" ))) (func (when which-function-mode (which-function))) ) (if func (propertize (which-function) 'font-lock-face props) "") )) (setq-default header-line-format '(:eval (list (header-buffer-name) " " (header-function-name) )))