8

Suppose, we have this org file:

* Header1
** Header1-1
** Header1-2

* Header2

   1. Item 1

      1. Item 1-1
      2. Item 1-2

   2. Item 2

When I open it by default it looks like this:

* Header1...
* Header2...

Unordered items are collapsed. But when I open Header2, all the elements of the ordered list items are visible, so I see this:

* Header2

   1. Item 1

      1. Item 1-1
      2. Item 1-2

   2. Item 2

I can cycle visibility by moving the cursor to Item 1 and clicking <tab>. Is it possible to make the ordered lists collapsed by default?

Drew
  • 75,699
  • 9
  • 109
  • 225
user4035
  • 1,039
  • 11
  • 24

1 Answers1

7

That is not specific only to ordered lists. This behaviour is related to plain lists (ordered, unordered, description) in general.

For more details, see the variable org-cycle-include-plain-lists. If this variable is set to integrate, plain list items will be treated like low-level headlines.

To the point:

(setq org-cycle-include-plain-lists 'integrate)

should fix your problem for all org files (if I understand your issue correctly).

If you want more granular control then you can also set this per directory, file, etc.

Also FWIW - items belonging to the same plain list must have the same indentation on the first line.

kmicu
  • 2,395
  • 1
  • 15
  • 15
  • The integrate setting can lead to strange effects when switching visibility to children - best read the doc string associated with the 'org-cycle-include-plain-lists' variable. –  Oct 09 '19 at 09:34
  • In my experience, this setting makes expanding top-level headlines significantly slower. Does anyone have a fix for this? – GNUmon Jun 25 '23 at 11:08