Function: org-agenda-filter-apply
org-agenda-filter-apply is a byte-compiled function defined in
org-agenda.el.gz.
Signature
(org-agenda-filter-apply FILTER TYPE &optional EXPAND)
Documentation
Set FILTER as the new agenda filter and apply it.
Optional argument EXPAND can be used for the TYPE tag and will expand the tags in the FILTER if any of the tags in FILTER are grouptags.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defun org-agenda-filter-apply (filter type &optional expand)
"Set FILTER as the new agenda filter and apply it.
Optional argument EXPAND can be used for the TYPE tag and will
expand the tags in the FILTER if any of the tags in FILTER are
grouptags."
;; Deactivate `org-agenda-entry-text-mode' when filtering
(when org-agenda-entry-text-mode (org-agenda-entry-text-mode))
(setq org-agenda-filter-form (org-agenda-filter-make-matcher
filter type expand))
;; Only set `org-agenda-filtered-by-category' to t when a unique
;; category is used as the filter:
(setq org-agenda-filtered-by-category
(and (eq type 'category)
(not (equal (substring (car filter) 0 1) "-"))))
(org-agenda-set-mode-name)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(when (or (org-get-at-bol 'org-hd-marker)
(org-get-at-bol 'org-marker))
(org-dlet
((tags (org-get-at-bol 'tags))
(cat (org-agenda-get-category))
(txt (or (org-get-at-bol 'txt) "")))
(unless (eval org-agenda-filter-form t)
(org-agenda-filter-hide-line type))))
(beginning-of-line 2)))
(when (get-char-property (point) 'invisible)
(ignore-errors (org-agenda-previous-line))))