emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
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: Sat, 28 May 2022 12:06:31 +0000	[thread overview]
Message-ID: <m2o7zh97zu.fsf@ntnu.no> (raw)
In-Reply-To: <87sfoucoyp.fsf@localhost>

Ihor Radchenko <yantar92@gmail.com> 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
> 		 (org-element-at-point
> 		  (org-element-property :contents-begin headline))
> 		 '(section))))
>   (when section
>     (org-fold-region
>      (org-element-property :begin section)
>      (org-element-property :end section)
>      nil 'drawer)))

Thanks!  This almost imitates the old behavior, except that all drawers
(i.e., including sub-headlines) would be opened when the headline it was
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.)

> Though we might also modify org-fold-show-entry to allow what you wish.
> I am not sure here.

That sounds nice.  So an optional behavior would be for it to open the
drawers as well, which I guess would lead to the "recursive" behavior
above I mentioned working, right?

  reply	other threads:[~2022-05-28 12:11 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
2022-05-28  3:31     ` Ihor Radchenko
2022-05-28 12:06       ` Tor Kringeland [this message]
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=m2o7zh97zu.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).