On 19 sep. 2012, at 12:34, Bastien <b...@altern.org> wrote:

> Hi Christopher,
> 
> Christopher Witte <ch...@witte.net.au> writes:
> 
>> I have a document with lots of inline tasks scattered throughout it. I
>> want to get an overview of the document so I use S-<TAB> to cycle to
>> CONTENTS, when I do that all of the inline tasks are displayed like
>> this:
> 
> You can add this hook:
> 
> (add-hook 'org-cycle-hook
>  (lambda (state) (when (eq state 'contents) (hide-sublevels 6))))
> 
>> Should this be the default? Is this also the behaviour that other
>> people expect?
> 
> I tend to think this should be the default but I'm not using inline
> tasks at all, so I'll wait other users' feedback on this.

I agree that this would be a good default, but not with a hard-coded 6.

(add-hook 'org-cycle-hook
 (lambda (state) (when (eq state 'contents)
                   (and (boundp 'org-inlinetask-min-level)
                        org-inlinetask-min-level
                        (hide-sublevels (1- org-inlinetask-min-level))))))


And it is probably better to wrap this into a function and add that function
to the default value of org-cycle-hook, after org-cucle-hide-drawers

- Carsten




Reply via email to