[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch to add full text summary by regexp
From: |
tridge |
Subject: |
patch to add full text summary by regexp |
Date: |
Thu, 23 May 2002 18:07:19 -0700 (PDT) |
I find it much more useful for the summary by regexp feature in RMAIL
to search the whole message not just the headers. Here is a patch that
adds an option in the rmail-summary group to allow the user to select
this behaviour.
Cheers, Tridge
--- orig/rmail.el Fri May 24 10:31:23 2002
+++ rmail.el Fri May 24 10:58:15 2002
@@ -108,6 +108,11 @@
:type 'boolean
:group 'rmail-retrieve)
+(defcustom rmail-summary-regexp-full nil
+ "*Non-nil if a regexp search should search the full message, not just the
headers."
+ :type 'boolean
+ :group 'rmail-summary)
+
(defcustom rmail-movemail-flags nil
"*List of flags to pass to movemail.
Most commonly used to specify `-g' to enable GSS-API authentication
@@ -2664,6 +2669,12 @@
(string-match recipients (or (mail-fetch-field "Cc") ""))))))
(defun rmail-message-regexp-p (n regexp)
+ "Return t, if for message number N, regexp REGEXP matches."
+ (if rmail-summary-regexp-full
+ (rmail-search-message n regexp)
+ (rmail-message-regexp-header-p n regexp)))
+
+(defun rmail-message-regexp-header-p (n regexp)
"Return t, if for message number N, regexp REGEXP matches in the header."
(let ((beg (rmail-msgbeg n))
(end (rmail-msgend n)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- patch to add full text summary by regexp,
tridge <=