🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #189774

rmail-summary-by-topic

#189774
From: Stephen C. Hill
Date: Thu, 15 Nov 1990 22:51
48 lines
2370 bytes
I was disappointed that the summarization by topic in the body of the
message didn't work, so I taught myself enough elisp to diagnose and fix
the problem.  It was a trivial fix, but took me a week of part-time hackery.
============================================================
;; rmail-summary-by-topic
;; 1989 R.A. Schnitzler
;; Distribution rules as for GNUemacs.

;(define-key rmail-mode-map "" 'rmail-summary-by-topic).

(defun rmail-summary-by-topic (subject &optional whole-message)
  "Display a summary of all messages with the given SUBJECT.
Normally checks the Subject field of headers;
but if WHOLE-MESSAGE is non-nil (prefix arg given), 
 look in the whole message.
SUBJECT is a string of names (regexps) separated by commas."
  (interactive "sTopics to summarize by: \nP")
  (rmail-new-summary
   (concat "about " subject)
   'rmail-message-subject-p
   (mail-comma-list-regexp subject) whole-message))

(defun rmail-message-subject-p (msg subject &optional whole-message)
  (save-restriction
    (goto-char (rmail-msgbeg msg))
    (search-forward "\n*** EOOH ***\n")
    (narrow-to-region
     (point)
; Whole topic summary was fixed by changing the "if command" in the
following line.
     (progn (search-forward (if whole-message "" "\n\n") nil t) (point)))
    (goto-char (point-min))
    (if whole-message (re-search-forward subject nil t)
      (string-match subject (or (mail-fetch-field "Subject") "")) )))



Steve

-- 
Stephen C. Hill, CDP
{ames,prls,pyramid,decwrl}!mips!steveh  or  steveh@mips.com 
Integration Products Group
MIPS Computer Systems, Stop 6-03
950 Deguigne Avenue
Sunnyvale, CA 94086, (408) 524-7436

Time is Nature's method of keeping us from bumping into ourselves.
Technical Details
Message-ID: <43286@mips.mips.COM>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!mips!moosehead.mips.com!steveh

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,b57634851cb5cd3b,start
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1990-11-15 14:51:42 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!mips!moosehead.mips.com!steveh
From: steveh@moosehead.mips.com (Stephen C. Hill)
Newsgroups: gnu.emacs.help
Subject: rmail-summary-by-topic
Message-ID: <43286@mips.mips.COM>
Date: 15 Nov 90 22:51:42 GMT
Sender: news@mips.COM
Reply-To: steveh@moosehead.mips.com (Stephen C. Hill)
Organization: Mips Computers, Inc.
Lines: 48
Posted: Thu Nov 15 23:51:42 1990