From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-agenda-skip-function does not find inherited tags Date: Wed, 06 Sep 2017 18:27:07 +0200 Message-ID: <87bmmnaj38.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpdAh-0001Yh-BC for emacs-orgmode@gnu.org; Wed, 06 Sep 2017 12:27:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpdAc-0001L1-DL for emacs-orgmode@gnu.org; Wed, 06 Sep 2017 12:27:23 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:36172) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dpdAc-0001JH-78 for emacs-orgmode@gnu.org; Wed, 06 Sep 2017 12:27:18 -0400 In-Reply-To: (Adrian Bradd's message of "Mon, 4 Sep 2017 11:06:40 -0400") 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.org@gnu.org Sender: "Emacs-orgmode" To: Adrian Bradd Cc: emacs-orgmode@gnu.org Hello, Adrian Bradd writes: > I have the following custom agenda command: > > (setq org-agenda-custom-commands > '(("ww" "Work 2 day view" > ((agenda "" > ((org-agenda-files '("~/tmp/tmp.org")) > (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp > ":@work:")) > (org-agenda-start-on-weekday nil) > (org-agenda-span 2) > (org-agenda-overriding-header "\n2 day work > view\n-----------------\n"))))))) > > Given the sample file below: > > * Top heading with tags > :@work:admin: > ** Next heading (inherited tags) > SCHEDULED: <2017-09-04 Mon> > ** Next heading (explicit tags) > :@work:admin: > SCHEDULED: <2017-09-04 Mon> > > The agenda will only display headings that have the tag explicitly defined. > In this case, "Next heading (explicit tags)". > > Is there a way I can convince the agenda to honour inherited tags in this > case? You write a more appropriate function and use it as `org-agenda-skip-function'. It could re-use the following snippet: (not (member "@work" (org-split-string (org-entry-get (point) "ALLTAGS")))) Regards, -- Nicolas Goaziou