Function: gnus-summary-limit-to-extra

gnus-summary-limit-to-extra is an interactive and byte-compiled function defined in gnus-sum.el.gz.

Signature

(gnus-summary-limit-to-extra HEADER REGEXP &optional NOT-MATCHING)

Documentation

Limit the summary buffer to articles that match an extra header.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-limit-to-extra (header regexp &optional not-matching)
  "Limit the summary buffer to articles that match an `extra' header."
  (interactive
   (let ((header
	  (intern
	   (gnus-completing-read
	    (if current-prefix-arg "Exclude extra header" "Limit extra header")
	    (mapcar #'symbol-name gnus-extra-headers)
	    t nil nil
	    (symbol-name
	     (car gnus-extra-headers))))))
     (list header
	   (read-string
	    (format "%s header %s (regexp): "
		    (if current-prefix-arg "Exclude" "Limit to")
		    header))
	   current-prefix-arg))
   gnus-summary-mode)
  (when (not (equal "" regexp))
    (prog1
	(let ((articles (gnus-summary-find-matching
			 (cons 'extra header) regexp 'all nil nil
			 not-matching)))
	  (unless (or articles not-matching)
	    (error "Found no matches for \"%s\"" regexp))
	  (gnus-summary-limit articles))
      (gnus-summary-position-point))))