0

In org-mode, is there any way to expand sub 'item'(not headline) tree cyclically? I tried hitting TAB(org-cycle), but it expands headline and all sub item tree showed at once.

Here is the example. Let's say I have an org file like below.

* h1
  - i1
    - i2
      - i3

What I want is the key stroke X to expand sub item tree like below.

  1. Open the org file. ('|' indicate the cursor)

    buffer shows:

    * h1|...
    
  2. Press X.

    buffer shows:

    * h1|
      - i1...
    
  3. Press X.

    buffer shows:

    * h1|
      - i1
        - i2...
    
  4. Press X.

    buffer shows:

    * h1|
      - i1
        - i2
          - i3
    
  5. Press X

    buffer shows:

    * h1|...
    

Is there any key storke like X?

Thank you for reading this question.

1

I'm not aware of a built-in command for this. By default, org-cycle operates on either headlines or list items, depending on the current line. Since you are starting at a headline, org-cycle shows/hides the contents of that headline as text. If you move point down to the i1 line I believe from there TAB will do what you want.

There is an option you can try: org-cycle-include-plain-lists. If you change the value to integrate it will get you closer to what you want (but not quite, see below).

To try it: M-x customize-option org-cycle-include-plain-lists and change the value to As children of outline headings.

Note that this does not give you exactly what you want. Read the doc for this option (C-h v org-cycle-include-plain-lists) for the details, it is not the default behavior because "This setting can lead to strange effects".

  • So I see the command does not exist by default.Thanks. – Kei Minagawa Mar 14 at 3:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.