From: Tor Kringeland <tor.kringeland@ntnu.no>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Re: Change in `org-cycle-hook' breaks behavior
Date: Fri, 27 May 2022 12:41:17 +0000 [thread overview]
Message-ID: <m2r14f407q.fsf@ntnu.no> (raw)
In-Reply-To: <87a6b3zc02.fsf@localhost>
Ihor Radchenko <yantar92@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).)
next prev parent reply other threads:[~2022-05-27 12:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 16:33 Change in `org-cycle-hook' breaks behavior Tor Kringeland
2022-05-27 7:10 ` [PATCH] " Ihor Radchenko
2022-05-27 12:41 ` Tor Kringeland [this message]
2022-05-28 3:31 ` Ihor Radchenko
2022-05-28 12:06 ` Tor Kringeland
2022-05-28 12:10 ` Tor Kringeland
2022-05-28 12:40 ` Ihor Radchenko
2022-05-28 14:14 ` Tor Kringeland
2022-05-29 12:19 ` Ihor Radchenko
2022-06-25 5:18 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2r14f407q.fsf@ntnu.no \
--to=tor.kringeland@ntnu.no \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).