Function: rmail-summary-by-topic

rmail-summary-by-topic is an autoloaded, interactive and byte-compiled function defined in rmailsum.el.gz.

Signature

(rmail-summary-by-topic SUBJECT &optional WHOLE-MESSAGE)

Documentation

Display a summary of all messages with the given SUBJECT.

Normally checks just the Subject field of headers; but when prefix argument WHOLE-MESSAGE is non-nil, looks in the whole message. SUBJECT is a regular expression.

View in manual

Probably introduced at or before Emacs version 29.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mail/rmailsum.el.gz
;;;###autoload
(defun rmail-summary-by-topic (subject &optional whole-message)
  "Display a summary of all messages with the given SUBJECT.
Normally checks just the Subject field of headers; but when prefix
argument WHOLE-MESSAGE is non-nil, looks in the whole message.
SUBJECT is a regular expression."
  (interactive
   ;; We quote the default subject, because if it contains regexp
   ;; special characters (eg "?"), it can fail to match itself.  (Bug#2333)
   (let* ((subject (regexp-quote (rmail-simplified-subject)))
	  (prompt (concat "Topics to summarize by (regexp"
			  (if subject ", default current subject" "")
			  "): ")))
     (list (read-string prompt nil nil subject) current-prefix-arg)))
  (if (and rmail-summary-progressively-narrow
	   (rmail-summary--exists-1))
      (rmail-summary-populate-displayed-messages))
  (rmail-new-summary
   (concat "about " subject)
   (list 'rmail-summary-by-topic subject whole-message)
   (if (and rmail-summary-progressively-narrow
	    (rmail-summary--exists-1))
       (lambda (msg s &optional wm)
	 (and (aref rmail-summary-currently-displayed-msgs msg)
	      (rmail-message-subject-p msg s wm)))
     'rmail-message-subject-p)
   subject whole-message))