From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Schwarzgruber Subject: Re: Org agenda -- checking for invisible tasks after filtering... Date: Sun, 16 Feb 2020 11:13:40 +0100 Message-ID: <87v9o6c017.fsf@gmail.com> References: <87bls9kayb.fsf@gmail.com> <87imknmpv3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42617) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3Gvq-0005o6-0O for emacs-orgmode@gnu.org; Sun, 16 Feb 2020 05:13:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3Gvo-000130-M1 for emacs-orgmode@gnu.org; Sun, 16 Feb 2020 05:13:45 -0500 In-reply-to: <87imknmpv3.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Bastien Cc: emacs-orgmode@gnu.org Hi Bastien, Bastien writes: > Christian Schwarzgruber 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