changeset 3443:7a15b35366f8

(rmail-summary-by-senders): New function. (rmail-message-senders-p): New function.
author Richard M. Stallman <rms@gnu.org>
date Thu, 03 Jun 1993 04:48:56 +0000
parents ef8ca321d049
children 2a646c40a4cf
files lisp/mail/rmailsum.el
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Thu Jun 03 03:54:55 1993 +0000
+++ b/lisp/mail/rmailsum.el	Thu Jun 03 04:48:56 1993 +0000
@@ -109,6 +109,22 @@
     (goto-char (point-min))
     (if whole-message (re-search-forward subject nil t)
       (string-match subject (or (mail-fetch-field "Subject") "")) )))
+
+(defun rmail-summary-by-senders (senders)
+  "Display a summary of all messages with the given SENDERS.
+SENDERS is a string of names separated by commas."
+  (interactive "sSenders to summarize by: ")
+  (rmail-new-summary
+   (concat "senders " senders)
+   'rmail-message-senders-p
+   (mail-comma-list-regexp senders)))
+
+(defun rmail-message-senders-p (msg senders)
+  (save-restriction
+    (goto-char (rmail-msgbeg msg))
+    (search-forward "\n*** EOOH ***\n")
+    (narrow-to-region (point) (progn (search-forward "\n\n") (point)))
+    (string-match senders (or (mail-fetch-field "From") ""))))
 
 ;; General making of a summary buffer.