Dear list,
I'd like to propose an addition to the function
"org-agenda-filter-by-category"; that is, the function called when pushing
"<" in an agenda.
As some might know adding a C-u in front of the command filters away the
current category instead of only listing it solemnly. I've made a change in
my source to allow multiple categories to be filtered away, instead of the
current functionality where only one category could be removed at a time.
This allows for multiple categories to be removed from the agenda. Very
simple, very effective.
Maybe some kind person could look at this and incorporate in the source?
(defun org-agenda-filter-by-category (strip)
"Keep only those lines in the agenda buffer that have a specific category.
The category is that of the current line."
(interactive "P")
(if org-agenda-filtered-by-category
(org-agenda-filter-show-all-cat)
(let ((cat (org-no-properties (get-text-property (point)
'org-category))))
(cond
((and cat (not strip))
(org-agenda-filter-apply
(list (concat "+" cat)) 'category))
((and cat strip)
(org-agenda-filter-apply
(push (concat "-" cat) org-agenda-category-filter) 'category))
((error "No category at point"))))))
/Gustav