Warm tip: This article is reproduced from serverfault.com, please click

Set initial visiblity to a certain level in org-mode

发布于 2019-06-11 03:46:35

Similar to this question except I want this as ideally a per-document setting or mode line. The ideal would be something like:

#+STARTUP: showlevels 3

Or if needed as a mode line:

# -*- org-showlevels: 3 -*-

And be equivalent to running C-3 S-tab when loading the file.

This does not appear to be directly supported in the initial visibility settings in the org-mode manual: https://orgmode.org/manual/Initial-visibility.html

Questioner
Elliott Slaughter
Viewed
0
Whil 2020-12-10 17:53:13

New startup options for this are available in Emacs Org mode master since today.

The implementation is slightly different than your suggestion Elliott, since startup keywords cannot have argument (to the best of my knowledge). But the following will now work if you are using Org mode master:

#+STARTUP: show3levels

(3 can be changed to any of 2,3,4,5)