[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Filtering agenda by tags.
From: |
Mike McLean |
Subject: |
Re: [O] Filtering agenda by tags. |
Date: |
Sat, 30 Apr 2011 11:48:23 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.18pre) Gecko/20110430 Lightning/1.0b3pre Lanikai/3.1.11pre |
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