From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Adrian Bradd <adrian.bradd@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-agenda-skip-function does not find inherited tags
Date: Wed, 06 Sep 2017 18:27:07 +0200 [thread overview]
Message-ID: <87bmmnaj38.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAMYmr8xDhsJ48BbhC+=N3Z3-u9GL0t2J9AdEe1JgM5KRmsc0BQ@mail.gmail.com> (Adrian Bradd's message of "Mon, 4 Sep 2017 11:06:40 -0400")
Hello,
Adrian Bradd <adrian.bradd@gmail.com> 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
next prev parent reply other threads:[~2017-09-06 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-04 15:06 org-agenda-skip-function does not find inherited tags Adrian Bradd
2017-09-06 16:27 ` Nicolas Goaziou [this message]
2017-09-09 5:36 ` Adam Porter
2017-09-11 0:10 ` Adrian Bradd
2017-09-11 19:35 ` Kaushal Modi
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=87bmmnaj38.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=adrian.bradd@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 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).