Function: org-agenda-filter-top-headline-apply

org-agenda-filter-top-headline-apply is a byte-compiled function defined in org-agenda.el.gz.

Signature

(org-agenda-filter-top-headline-apply HL &optional NEGATIVE)

Documentation

Filter by top headline HL.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defun org-agenda-filter-top-headline-apply (hl &optional negative)
  "Filter by top headline HL."
  (org-agenda-set-mode-name)
  (save-excursion
    (goto-char (point-min))
    (while (not (eobp))
      (let* ((pos (org-get-at-bol 'org-hd-marker))
             (tophl (and pos (org-find-top-headline pos))))
        (when (and tophl (funcall (if negative 'identity 'not)
				  (string= hl tophl)))
          (org-agenda-filter-hide-line 'top-headline)))
      (beginning-of-line 2)))
  (when (get-char-property (point) 'invisible)
    (org-agenda-previous-line))
  (setq org-agenda-top-headline-filter hl
	org-agenda-filtered-by-top-headline t))