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.
This commit is contained in:
parent
ba2ddadb53
commit
3e2215642b
2 changed files with 15 additions and 2 deletions
4
etc/NEWS
4
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
|
||||
|
||||
+++
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue