[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Exclude tag from custom agenda
From: |
Karl Voit |
Subject: |
Re: [O] Exclude tag from custom agenda |
Date: |
Sun, 9 Dec 2012 22:02:37 +0100 |
User-agent: |
slrn/0.9.9 (Linux) |
* Memnon Anon <address@hidden> wrote:
>
> I'm in a hurry, but lets see if I can give you something in 5 minutes.
:-)
Following works:
,----[ section within org-agenda-custom-commands ]
| ("b" "borrowed stuff" tags "+borrowed" (
| (org-agenda-overriding-header "stuff that I borrowed")
| (org-agenda-skip-function 'tag-without-done-or-canceled)
| ))
`----
,----[ you function ]
| (defun tag-without-done-or-canceled ()
| "Show items with tag \"borrowed\" that are neither in \"DONE\" or
\"CANCELED \" state."
| (let ((state (org-entry-get (point) "TODO")))
| (if (and (member "borrowed" (org-get-tags-at (point)))
| (not (string= state "DONE"))
| (not (string= state "CANCELED")))
| nil ; do not skip
| (line-end-position)))) ; skip
`----
Thanks very much! Very handy to me!
One little thing: there are not items listed that inherit the
«borrowed» tag from any higher level heading. But I guess this is
something that could not be done easily in this case. Right?
--
Karl Voit