emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Visibility cycling with inline tasks


From: Carsten Dominik
Subject: Re: [O] Visibility cycling with inline tasks
Date: Wed, 19 Sep 2012 12:59:19 +0200

On 19 sep. 2012, at 12:34, Bastien <address@hidden> wrote:

> Hi Christopher,
> 
> Christopher Witte <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]