Function: org-agenda-filter-by-category

org-agenda-filter-by-category is an interactive and byte-compiled function defined in org-agenda.el.gz.

Signature

(org-agenda-filter-by-category STRIP)

Documentation

Filter lines in the agenda buffer that have a specific category.

The category is that of the current line. With a C-u (universal-argument) prefix argument, exclude the lines of that category. When there is already a category filter in place, this command removes the filter.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defun org-agenda-filter-by-category (strip)
  "Filter lines in the agenda buffer that have a specific category.
The category is that of the current line.
With a `\\[universal-argument]' prefix argument, exclude the lines of that category.
When there is already a category filter in place, this command removes the
filter."
  (interactive "P")
  (if (and org-agenda-filtered-by-category
	   org-agenda-category-filter)
      (org-agenda-filter-show-all-cat)
    (let ((cat (org-no-properties (org-agenda-get-category))))
      (cond
       ((and cat strip)
        (org-agenda-filter-apply
         (push (concat "-" cat) org-agenda-category-filter) 'category))
       (cat
        (org-agenda-filter-apply
         (setq org-agenda-category-filter
	       (list (concat "+" cat)))
	 'category))
       (t (error "No category at point"))))))