Ihor Radchenko <yanta...@gmail.com> writes:

> I assume that you have org-startup-folded set to 't. Then, what you are
> seeing is caused by org-cycle-set-startup-visibility that folds all the
> drawers unless org-startup-folded is set to 'showeverything.

Yes, that is my customization :)

> A more efficient way could be introducing a new customization similar to
> org-cycle-hide-block-startup. Say, it can be
> org-cycle-hide-drawer-startup. See the attached patch.

That sounds good.  But this would only fold the drawers when starting
org-mode, right?  Basicall my configuration has been to remove
`org-cycle-hide-drawers' from `org-cycle-hook', which opened all the
drawers whenever I called `org-cycle' (bound to TAB).  I also had a
custom function where I added `org-cycle-hide-drawers' back to the hook
and then called `org-cycle' (bound to C-TAB).  This way I could toggle
showing/not showing the drawers when opening a headline in any Org
buffer.  (Both of them would ignore the visibility of the drawers in the
headline and show them/hide them unconditionally.  I can always hide the
drawers by adding `org-cycle-hide-drawers' to `org-cycle-hook' when I
call my custom function, but I cannot replicate the behavior of
`org-cycle' without `org-cycle-hide-drawers' in the hook, which would
uncoditionally open all the drawers (AFAIK).)

Reply via email to