unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: emacs-devel@gnu.org
Subject: Please install in Master
Date: Sun, 17 Jun 2018 18:17:41 -0400	[thread overview]
Message-ID: <E1fUfzR-00039e-Gp@fencepost.gnu.org> (raw)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Would someone please install this for me?

NEWS:

** 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.


2018-06-17  Richard Stallman  <rms@gnu.org>

	* lisp/mail/rmailsum.el (rmail-summary-by-senders): Offer
	From field of current message as a default argument.


diff -u /home/rms/emacs-git/build-may-23/lisp/mail/rmailsum.el.\~1\~ /home/rms/emacs-git/build-may-23/lisp/mail/rmailsum.el
--- /home/rms/emacs-git/build-may-23/lisp/mail/rmailsum.el.~1~	2018-05-23 22:20:00.267454621 -0400
+++ /home/rms/emacs-git/build-may-23/lisp/mail/rmailsum.el	2018-06-17 07:33:31.175620267 -0400
@@ -390,8 +390,17 @@
 ;;;###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))

Diff finished.  Sun Jun 17 12:07:51 2018

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





             reply	other threads:[~2018-06-17 22:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-17 22:17 Richard Stallman [this message]
2018-06-18  7:24 ` Please install in Master Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1fUfzR-00039e-Gp@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).