Endless Parentheses

Ramblings on productivity and technical subjects.

profile for Malabarba on Stack Exchange

Fine-tuning subtree visibility in org-mode

Org is one of those packages that you can use for a lifetime and still not know all of its features. One of the first things you learn is how to use the #+STARTUP header to define the initial visibility of headlines when you first open an org-mode file. But did you know you can also use that on a per headline basis?

Besides the usual 4 attributes you can chose from for the header (overview, content, showall and showeverything), you can also assign similar options to the VISIBILITY property of any headline. The specific options are folded, children, content, and all, and their names are fairly self-explanatory.

As an example, remember this screenshot of my init.org from the birthday post?


To achieve that, you just had to set the * init.el headline to have :VISIBILITY: children, along with the usual startup header you see in the image. I was almost implementing this myself, when I decided to Google first and wasn’t surprised to find org-mode already had it.

Tags: emacs,

comments powered by Disqus