Function: gnus-find-matching-articles

gnus-find-matching-articles is a byte-compiled function defined in gnus-sum.el.gz.

Signature

(gnus-find-matching-articles HEADER REGEXP)

Documentation

Return a list of all articles that match REGEXP on HEADER.

This search includes all articles in the current group that Gnus has fetched headers for, whether they are displayed or not.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-find-matching-articles (header regexp)
  "Return a list of all articles that match REGEXP on HEADER.
This search includes all articles in the current group that Gnus has
fetched headers for, whether they are displayed or not."
  (let ((articles nil)
	(func (intern (concat "mail-header-" header)))
	(case-fold-search t))
    (dolist (header gnus-newsgroup-headers)
      ;; FIXME: when called from gnus-summary-limit-include-thread via
      ;; gnus-summary-limit-include-matching-articles, `regexp' is a decoded
      ;; string whereas the header isn't decoded.
      (when (string-match regexp (funcall func header))
	(push (mail-header-number header) articles)))
    (nreverse articles)))