Function: gnus-summary-limit-to-marks

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

Signature

(gnus-summary-limit-to-marks MARKS &optional REVERSE)

Documentation

Limit the summary buffer to articles that are marked with MARKS (e.g. "DK").

If REVERSE (the prefix), limit the summary buffer to articles that are not marked with MARKS. MARKS can either be a string of marks or a list of marks. Returns how many articles were removed.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-limit-to-marks (marks &optional reverse)
  "Limit the summary buffer to articles that are marked with MARKS (e.g. \"DK\").
If REVERSE (the prefix), limit the summary buffer to articles that are
not marked with MARKS.  MARKS can either be a string of marks or a
list of marks.
Returns how many articles were removed."
  (interactive
   (list
    (completing-read "Marks: "
		     (let ((mark-list '()))
		       (mapc (lambda (datum)
			       (cl-pushnew   (gnus-data-mark datum) mark-list))
			     gnus-newsgroup-data)
		       (mapcar 'char-to-string  mark-list)))
    current-prefix-arg) gnus-summary-mode)
  (prog1
      (let ((data gnus-newsgroup-data)
	    (marks (if (listp marks) marks
		     (append marks nil))) ; Transform to list.
	    articles)
	(while data
	  (when (if reverse (not (memq (gnus-data-mark (car data)) marks))
		  (memq (gnus-data-mark (car data)) marks))
	    (push (gnus-data-number (car data)) articles))
	  (setq data (cdr data)))
	(gnus-summary-limit articles))
    (gnus-summary-position-point)))