Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-06-24 Thread Ihor Radchenko
Ihor Radchenko writes: > 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. Applied onto main via bcfed0f34. Best, Ihor

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-29 Thread Ihor Radchenko
Tor Kringeland writes: > Maybe a function like that could be added to Org, that the user could > add to `org-cycle-hooks' to produce the "opposite" of > `org-cycle-hide-drawers'/does what `org-cycle' used to do without > `org-cycle-hide-drawers' in the hook in Org 9.5? I will take a note on

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-28 Thread Tor Kringeland
Ihor Radchenko writes: > If you want all the drawers in all the children to be opened, you can > instead do the following: > > (let* ((headline (save-excursion (org-back-to-heading) > (org-element-at-point > (when headline > (org-fold-region > (org-element-property :begin

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-28 Thread Ihor Radchenko
Tor Kringeland writes: > Ihor Radchenko writes: > >> Sure. Now, you need to call a different function to open all the drawers >> unconditionally. That function is: >> > Thanks! This almost imitates the old behavior, except that all drawers > (i.e., including sub-headlines) would be opened when

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-28 Thread Tor Kringeland
Tor Kringeland writes: > a part of was opened. (So pressing TAB multiple times would first show > the outline with the first headline open, then the next would show > sub-headlines with their drawers open.) Correction: it wouldn't show the drawer of the headline on the first TAB press. But on

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-28 Thread Tor Kringeland
Ihor Radchenko writes: > Sure. Now, you need to call a different function to open all the drawers > unconditionally. That function is: > > (let* ((headline (save-excursion (org-back-to-heading) > (org-element-at-point))) >(section (org-element-lineage >

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-27 Thread Ihor Radchenko
Tor Kringeland writes: >> 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. > > I can always hide the > drawers by adding `org-cycle-hide-drawers' to `org-cycle-hook'

Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-27 Thread Tor Kringeland
Ihor Radchenko 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

[PATCH] Re: Change in `org-cycle-hook' breaks behavior

2022-05-27 Thread Ihor Radchenko
Tor Kringeland writes: > In Org 9.5, `org-cycle-hook' includes `org-cycle-hide-drawers', which > hides the drawer after opening the contents of a headline with > `org-cycle'. However, if you removed `org-cycle-hide-drawers' from the > hook, `org-cycle' would show you the drawers (at least the