emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mike McLean <mike.mclean@pobox.com>
To: emacs-orgmode@gnu.org
Subject: Re: Filtering agenda by tags.
Date: Sat, 30 Apr 2011 11:48:23 -0400	[thread overview]
Message-ID: <4DBC2F47.30609@pobox.com> (raw)
In-Reply-To: <87vcy99g1t.fsf@fastmail.fm>

On 4/20/11 10:02 AM, Matt Lundin wrote:
> I believe the only option is to write a skip function that uses
> org-entry-get to get all the tags at point.
I have this in my org-setup and use it to generate agenda views that
skip certain tags, whether that tag is local or inherited.

#+begin_src emacs-lisp
  (defun mlm-skip-if-bill-pay()
    "Skip entries that are Tagged Bill_Pay taking into account inheritance"
    (let* ((entry-tags (org-get-tags-at (point))))
      (if (member "Bill_Pay" entry-tags)
          (progn (outline-next-heading) (point))
        nil
        )
      )
    )
#+end_src

And then the the custom agenda definiitions where I want to exclude
this, I have:

#+begin_src emacs-lisp
(org-agenda-skip-function 'mlm-skip-if-bill-pay)
#+end_src

      reply	other threads:[~2011-04-30 15:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 10:17 Filtering agenda by tags Radosław Grzanka
2011-04-20 12:52 ` Matt Lundin
2011-04-20 13:05   ` Radosław Grzanka
2011-04-20 13:12     ` Matt Lundin
2011-04-20 13:16       ` Radosław Grzanka
2011-04-20 14:02         ` Matt Lundin
2011-04-30 15:48           ` Mike McLean [this message]

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=4DBC2F47.30609@pobox.com \
    --to=mike.mclean@pobox.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).