From 5d1287c42ee387de7528f7b07c099145d1a6841c Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Tue, 17 Jan 2006 09:36:49 +0000 Subject: [PATCH] (rmail-summary-font-lock-keywords): Fix regular expression for unread messages. (rmail-summary-mode): Added documentation for the filtering commands. (rmail-summary-mode-map): Added keybinding for rmail-summary-by-sender. (rmail-summary-get-summary): Don't show attributes, only user-defined keywords. --- lisp/mail/ChangeLog | 14 ++++++++++++++ lisp/mail/rmailsum.el | 30 ++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/lisp/mail/ChangeLog b/lisp/mail/ChangeLog index 655a2ec953e..201fce711f4 100644 --- a/lisp/mail/ChangeLog +++ b/lisp/mail/ChangeLog @@ -1,3 +1,17 @@ +2006-01-17 Alex Schroeder + + * rmailsum.el (rmail-summary-font-lock-keywords): Fix regular + expression for unread messages. + (rmail-summary-mode): Added documentation for the filtering + commands. + (rmail-summary-mode-map): Added keybinding for + rmail-summary-by-sender. + (rmail-summary-get-summary): Don't show attributes, only + user-defined keywords. + + * rmailedit.el (rmail-cease-edit): Do not adjust the marker of the + last message. + 2006-01-17 Henrik Enberg * rmailout.el (rmail-output-read-file-name): Make sure search in diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 2e5dba0089b..c786b073405 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -59,7 +59,7 @@ (defvar rmail-summary-font-lock-keywords '(("^.....D.*" . font-lock-string-face) ; Deleted. - ("^....-.*" . font-lock-type-face) ; Unread. + ("^.....-.*" . font-lock-type-face) ; Unread. ;; Neither of the below will be highlighted if either of the above are: ("^.....[^D-]....\\(......\\)" 1 font-lock-keyword-face) ; Date. ("{ \\([^\n}]+\\) }" 1 font-lock-comment-face)) ; Labels. @@ -700,6 +700,22 @@ These additional commands exist: \\[rmail-summary-undelete-many] Undelete all or prefix arg deleted messages. \\[rmail-summary-wipe] Delete the summary and go to the Rmail buffer. +Commands for filtering the summary: + +\\[rmail-summary-by-labels] Filter by label. +\\[rmail-summary-by-topic] Filter by Subject. + Filter by the entire message (header and body) if given a + prefix argument. +\\[rmail-summary-by-sender] Filter by From field. +\\[rmail-summary-by-recipients] Filter by To, From, and Cc fields. + Filter by To and From only if given a prefix argument. + +The commands listed above take comma-separated lists of regular +expressions. + +\\[rmail-summary-by-regexp] Filter by any header line. +\\[rmail-summary] Restore the default summary. + Commands for sorting the summary: \\[rmail-summary-sort-by-date] Sort by date. @@ -837,6 +853,7 @@ message and highlight the buffer." (define-key rmail-summary-mode-map "\e\C-h" 'rmail-summary) (define-key rmail-summary-mode-map "\e\C-l" 'rmail-summary-by-labels) (define-key rmail-summary-mode-map "\e\C-r" 'rmail-summary-by-recipients) + (define-key rmail-summary-mode-map "\e\C-f" 'rmail-summary-by-sender) (define-key rmail-summary-mode-map "\e\C-s" 'rmail-summary-by-regexp) (define-key rmail-summary-mode-map "\e\C-t" 'rmail-summary-by-topic) (define-key rmail-summary-mode-map "m" 'rmail-summary-mail) @@ -1667,10 +1684,15 @@ KEYWORDS is a comma-separated list of labels." (defun rmail-summary-get-summary (n) "Return a summary line for message N." - (let* ((keywords (rmail-desc-get-keywords n)) - (str (if keywords + (let (keywords str) + (dolist (keyword (rmail-desc-get-keywords n)) + (when (and (rmail-keyword-p keyword) + (not (rmail-attribute-p keyword))) + (setq keywords (cons keyword keywords)))) + (setq keywords (nreverse keywords)) + (setq str (if keywords (concat "{ " (mapconcat 'identity keywords " ") " } ") - ""))) + "")) (funcall rmail-summary-line-decoder (format "%5s%s%6s %25s%s %s\n" n -- 2.39.2