[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3e22156: rmail-summary-by-senders defaults to sende
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 3e22156: rmail-summary-by-senders defaults to sender |
Date: |
Mon, 18 Jun 2018 03:21:27 -0400 (EDT) |
branch: master
commit 3e2215642bbca3d1335155278eace39d0a87c267
Author: Richard Stallman <address@hidden>
Commit: Paul Eggert <address@hidden>
rmail-summary-by-senders defaults to sender
* etc/NEWS: Mention this.
* lisp/mail/rmailsum.el (rmail-summary-by-senders):
Offer From field of current message as a default argument.
---
etc/NEWS | 4 ++++
lisp/mail/rmailsum.el | 13 +++++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 87c3950..5568e29 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -522,6 +522,10 @@ been removed. Use 'encode-coding-string',
'decode-coding-string', and
If this option is non-nil, messages appended to an output file by the
'rmail-output' command have their Deleted flag reset.
+*** The command 'rmail-summary-by-senders' with an empty argument
+selects the messages to summarize with a regexp that matches the
+sender of the current message.
+
* New Modes and Packages in Emacs 27.1
+++
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 3dd486a..e5363d2 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -390,8 +390,17 @@ SUBJECT is a regular expression."
;;;###autoload
(defun rmail-summary-by-senders (senders)
"Display a summary of all messages whose \"From\" field matches SENDERS.
-SENDERS is a regular expression."
- (interactive "sSenders to summarize by: ")
+SENDERS is a regular expression. The default for SENDERS matches the
+sender of the current messsage."
+ (interactive
+ (let* ((def (rmail-get-header "From"))
+ ;; We quote the default argument, because if it contains regexp
+ ;; special characters (eg "?"), it can fail to match itself.
+ (sender (regexp-quote def))
+ (prompt (concat "Senders to summarize by (regexp"
+ (if sender ", default this message's sender" "")
+ "): ")))
+ (list (read-string prompt nil nil sender))))
(rmail-new-summary
(concat "senders " senders)
(list 'rmail-summary-by-senders senders) 'rmail-message-senders-p senders))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3e22156: rmail-summary-by-senders defaults to sender,
Paul Eggert <=