Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fold all blocks below certain level in emacs org-mode? [duplicate]

I often need to see information up to (down to, really) certain level of detail. Is there a way to unfold blocks to a certain level, and hide the rest? For example:

* name
Joe
** home number
111-111-1111
*** hobby
fishing
*** likes
books
** work number
222-222-2222

If third-level and below blocks are rarely used, then I would like to see them folded as such:

* name
Joe
** home number
111-11-1111
*** hobby...
*** likes...
** work number
222-22-2222
like image 716
user443854 Avatar asked Mar 21 '12 16:03

user443854


2 Answers

There's hide-sublevels. The exact number to use for the level you need will typically vary depending on the major mode, tho. I usually use C-1 M-x hide-sublevels (aka C-1 C-c C-q), but for some major modes I use much deeper levels.

like image 161
Stefan Avatar answered Oct 15 '22 06:10

Stefan


If you place the cursor at the beginning of the buffer, a simple <TAB> will cycle the visibility of the entire subtree.

Alternatively, calling it with a prefix argument will set the global subtree visibility to the depth specified by the argument (C-u <TAB>). For example; C-u 3 <TAB> would show everything up to the third level of the tree and hide everything below that.

Also see http://orgmode.org/manual/Visibility-cycling.html#Visibility-cycling

like image 45
Colin Cochrane Avatar answered Oct 15 '22 07:10

Colin Cochrane