emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Cassio Koshikumo <ckoshikumo@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Bug or expected behavior? org-sparse-tree visibility toggling
Date: Fri, 24 Feb 2023 18:57:03 -0300	[thread overview]
Message-ID: <CAJP-4jMc0tkmhUAhLOHjyeAVf2PAWoDi_y-FjhEVkAVc6qZm6Q@mail.gmail.com> (raw)

I don't know if this can be considered a bug or if I'm trying to do
something not supported.

Create an .org file with the following contents:

* First Level
** One :tag:
*** Child
** Two
** Three
** Four :tag:
** Five

Now, C-c / m (or M-x org-sparse-tree and select m) and Match: tag.

The resulting sparse tree looks like this:

* First Level
** One :tag:
*** Child
** Four :tag:

So far, so good. Now, put point on heading One and press TAB. Child is hidden.

The problem: press TAB again. Now Two and Three are also shown,
effectively breaking the sparse tree filtering. (Actually Five is
shown, too, it seems...)

As far as I can tell, this only happens when the heading has a
subheading, like Child. But even when dealing with headings that DON'T
have a subheading, the ellipsis kinda breaks and ends up in the next
line, and successive TABs do nothing.

(In fact, I was trying different variations of the tree just now and
it seems the behavior is WILDLY inconsistent. If there's a blank line
between One and Child, then the first TABalready messes the tree up.
Don't know if further variations produce other results.)

So, can these behaviors be considered bugs? Or are sparse trees not
meant to have their visibility manipulated like this, and should be
considered a static, filtered view of the tree, with interactions
discouraged?

Thanks!

-- 
Cassio Koshikumo


             reply	other threads:[~2023-02-24 21:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 21:57 Cassio Koshikumo [this message]
2023-02-26 11:53 ` Bug or expected behavior? org-sparse-tree visibility toggling Ihor Radchenko
2023-02-27 20:12   ` Cassio Koshikumo
2023-03-24 12:16     ` [FR] Make org-occur highlights always visible, even upon folding (was: Bug or expected behavior? org-sparse-tree visibility toggling) 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=CAJP-4jMc0tkmhUAhLOHjyeAVf2PAWoDi_y-FjhEVkAVc6qZm6Q@mail.gmail.com \
    --to=ckoshikumo@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).