all messages for Emacs-related lists mirrored at yhetil.org
 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 19:49:39 +0800	[thread overview]
Message-ID: <87wnl53cq4.fsf@localhost> (raw)
In-Reply-To: <CAEOO5TdSb38QoKUEfTtEJQ3g3Xo+RozDBtnWeTXSgXAxhnY6uQ@mail.gmail.com>

Carlos Pita <carlosjosepita2@gmail.com> writes:

>> I think you misread the docstring for org-show-context-detail:
>
> Sorry, I don't concur here.
>
> This is in the docstring I'm interested in (org-occur):

I agree that org-occur could have a better docstring.

> It's not very relevant to my concern if things are first hidden and
> then revealed, because that will just change my question to why
> top-levels are not hidden to begin with. Again:
>
>     The tree will show the lines where the regexp matches, and any other context
>     defined in ‘org-show-context-detail’, which see.
>
> The top-level headings in my example don't match the regexp and are
> not part of the context that org-show-context-detail should reveal
> with my current configuration. I cannot help concluding that this fact
> contradicts the documentation.

Currently, Org never ever hides headlines without parent and the top
section of the Org buffers.

Note that org-occur's docstring never explicitly states that all
non-matching lines will be hidden, just that matching lines will be
revealed and that the tree will be "compact". Though I understand your
confusion and I do agree that we should either clarify the docstring or
change org-occur to hide non-matching subtrees.

Changing org-occur is actually trivial (just one LOC), but this would be
a major change and can catch old Org users by surprise. I would prefer
to hear other's opinions before pushing such patch upsteam.

>> Consider agenda views. The relevant default value in
>
> I indeed considered the agenda, but I prefer using a sparse tree. I
> have a file with a large number of brief notes in top level headings
> and it's useful to see the expanded matching notes, the behaviour of
> org-occur is ideal in this regard, instead the agenda only shows the
> headings and even in follow mode it's more cumbersome than merely
> pressing M-g n/p directly in the target buffer.

FYI, there is org-agenda-entry-text-mode ("E" in agenda buffers).

Best,
Ihor


      reply	other threads:[~2021-11-18 11:48 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
2021-11-18 11:04       ` Carlos Pita
2021-11-18 11:49         ` Ihor Radchenko [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnl53cq4.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.