[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: skip-entry-if category
From: |
Adam Spiers |
Subject: |
Re: [Orgmode] Re: skip-entry-if category |
Date: |
Mon, 2 Nov 2009 14:14:08 +0000 |
User-agent: |
Mutt/1.5.20 (2009-08-17) |
Carsten Dominik (address@hidden) wrote:
> On Aug 22, 2009, at 2:47 PM, Matt Lundin wrote:
> >Hi Memnon
> >
> >Memnon Anon wrote:
> >>However, there is one thing I am not able to figure out:
> >>
> >>Using skipping, it is easy to limit my daily agenda to certain
> >>tags like:
> >>(org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp
> >>":STUDIUM:"))))
> >>
> >>Is it possible to do the same with Categories?
> >>I think there must be a way, but all my attempts did not work :(.
> >
> >I believe this is not possible with the built in org agenda skip
> >functions, since they search only the text within the subtree and do
> >not recognize inherited tags and properties.
> >
> >However, I suspect that one could build a skip function using
> >org-entry-properties that would accomplish this goal.
>
> Much faster in this special case will be to use `org-get-category'
> instead of accessing all properties of the entry with
> org-entry-properties.
I wrote the following to accomplish this, but it would be much nicer
if you could use (org-agenda-skip-entry-if 'category "mycategory").
(defun org-agenda-skip-select-category-function (category-to-select)
"Creates a function suitable for use with
`org-agenda-skip-function' which skips all items except for those
in the provided category."
`(lambda ()
(if (equal (org-get-category) ,category-to-select)
nil ;; don't skip
;; The invisible-ok param below seems to be needed
;; in order to avoid infinite loops:
(org-end-of-subtree t))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Orgmode] Re: skip-entry-if category,
Adam Spiers <=