I like to structure my org-mode projects using the :CATEGORY: property, however categories seem not to be recognised by org-agenda-filter-by-regexp (bound to =). When viewing a rather large list of TODO items, it would be helpful to be able to narrow the list to matching categories.
I know that I can use org-agenda-filter-by-category (<), but this command must be executed on the category entry.
Is there a way to regexp filter the Org Agenda including categories?
The function below performs what I'd like, however I can't get it to work from the org-agenda dispatcher as a custom agenda command.
(defun rnkn/org-category-match (str)
"Org Agenda match TODO headlines matching :CATEGORY: property STR."
(interactive "sCategory: ")
(org-tags-view t (concat "CATEGORY={" str "}")))
org-agenda-filter-by-regexphas problems -- my limited tests tonight revealed it to be inconsistent (i.e., sometimes it works, sometimes it doesn't, and it depends on which line the cursor is on) -- also, it is not even included as a function in a fairly recent version of Emacs Trunk from a couple of months ago -- i.e., I had to pull the function from the web to try it. In my opinion, it would be better to design a function that creates a custom read-string where the input creates a variable usingorg-agenda-skip-functionand then run a neworg-agenda . . .. - lawlist