emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Schwarzgruber <c.schwarzgruber.cs@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Org agenda -- checking for invisible tasks after filtering...
Date: Sun, 16 Feb 2020 11:13:40 +0100	[thread overview]
Message-ID: <87v9o6c017.fsf@gmail.com> (raw)
In-Reply-To: <87imknmpv3.fsf@gnu.org>

Hi Bastien,

Bastien <bzg@gnu.org> writes:

> Christian Schwarzgruber <c.schwarzgruber.cs@gmail.com> writes:
>
>> The question is now, is it possible to further reduce the advised
>> functions to just one advised function.
>
> I am sorry, I don't understand what change does it imply on Org's
> side.  Can you explain us a bit more?

Nothing need to be changed on Org's side (I guess). I'm just wondering if there
is a single spot where I can hook in (advice) to achieve the same as with the
currently two advice I use.

The project org-super-agenda advices `org-agenda-finalize-entries` and groups
the entries. However, when one uses the org filter functionality some groups
might be empty, which looks ugly. My implementation to handle that case is to
advice the following functions `org-agenda-filter-apply` and
`org-agenda-finalize`. Both will call the same function
`org-super-agenda--hide-or-show-groups`. If all tasks inside a group have the
invisible property set the group gets hidden as well, and vica versa.

The author of `org-super-agenda` doesn't like my implementation which uses
two advice. But I couldn't find a single spot where I can hook in, and check if
all tasks are hidden...


Thanks!

Christian

  reply	other threads:[~2020-02-16 10:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-15 12:52 Org agenda -- checking for invisible tasks after filtering Christian Schwarzgruber
2020-02-03 19:29 ` Bastien
2020-02-16 10:13   ` Christian Schwarzgruber [this message]
2020-02-16 23:47     ` Bastien
2020-02-17 15:49       ` Christian Schwarzgruber
2020-02-17 17:44         ` Bastien
2020-02-17 20:55           ` Christian Schwarzgruber
2020-02-17 23:13             ` Bastien

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=87v9o6c017.fsf@gmail.com \
    --to=c.schwarzgruber.cs@gmail.com \
    --cc=bzg@gnu.org \
    --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).