emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Carlos Pita <carlosjosepita2@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-occur doesn't hide unmatching top-levels [9.5 (release_9.5-225-g494c20.dirty @ /Users/carlos/Install/Source/org-mode/lisp/)]
Date: Thu, 18 Nov 2021 18:29:43 +0800	[thread overview]
Message-ID: <87h7c992p4.fsf@localhost> (raw)
In-Reply-To: <CAEOO5Tfp33vOHE4aXFt4J4KjFg=tKxohY6byNFTccFbd5WQ=ZQ@mail.gmail.com>

Carlos Pita <carlosjosepita2@gmail.com> writes:

> I see no reason why a match inside b2 will hide b1 and b3 but not a
> and c (I'm referring to the headings, not the contents).

I think you misread the docstring for org-show-context-detail:

>> Alist between context and visibility span when **revealing** a ;; <-- revealing!
>> location.
>> 
>> Some actions may move point into invisible
>> locations.  As a consequence, Org always exposes a neighborhood
>> around point.  How much is shown depends on the initial action,
>> or context.

This variable does not control how much text is hidden, but rather how
much context is revealed around a folded text.

Your misunderstanding may come from the fact that you are interested in
org-occur, which first folds everything inside lowest-level headings.

Consider agenda views. The relevant default value in
org-show-context-detail is (agenda . local). If you press <RET> on an
agenda entry which is located _inside folded subtree_, only the headline
will be revealed. However, if e.g. the headline and it's siblings are
already revealed, org-show-context-detail will not cause siblings to be
hidden.

Best,
Ihor



  parent reply	other threads:[~2021-11-18 10:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 19:15 [BUG] org-occur doesn't hide unmatching top-levels [9.5 (release_9.5-225-g494c20.dirty @ /Users/carlos/Install/Source/org-mode/lisp/)] Carlos Pita
2021-11-17 14:20 ` Ihor Radchenko
2021-11-17 21:01   ` Carlos Pita
2021-11-17 21:21     ` Carlos Pita
2021-11-18 10:29     ` Ihor Radchenko [this message]
2021-11-18 11:04       ` Carlos Pita
2021-11-18 11:49         ` 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=87h7c992p4.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=carlosjosepita2@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).