Carsten Dominik (carsten.domi...@gmail.com) 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)))) _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode