[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-agenda-skip-function does not find inherited tags
From: |
Nicolas Goaziou |
Subject: |
Re: [O] org-agenda-skip-function does not find inherited tags |
Date: |
Wed, 06 Sep 2017 18:27:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hello,
Adrian Bradd <address@hidden> 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