aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2015-05-26 21:04:19 -0400
committerGlenn Morris2015-05-26 21:04:19 -0400
commitd3155315c85212f224fc5df0239182dafdfd6284 (patch)
tree1e576b7f9b3d6cf7c44ca621f57398701051ff15
parent5e9756e4c68a199f051c2b9998c07a683ff479ff (diff)
downloademacs-d3155315c85212f224fc5df0239182dafdfd6284.tar.gz
emacs-d3155315c85212f224fc5df0239182dafdfd6284.zip
* lisp/mail/rmailsum.el: Commas no longer separate regexps. (Bug#19026)
(rmail-summary-by-recipients, rmail-summary-by-topic) (rmail-summary-by-senders): No longer use mail-comma-list-regexp. * doc/emacs/rmail.texi (Rmail Make Summary): Update for this change. ; * etc/NEWS: Mention this.
-rw-r--r--doc/emacs/rmail.texi11
-rw-r--r--etc/NEWS14
-rw-r--r--lisp/mail/rmailsum.el18
3 files changed, 20 insertions, 23 deletions
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index 82ac99f4776..6cad28099a6 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -926,8 +926,7 @@ commas.
926@findex rmail-summary-by-recipients 926@findex rmail-summary-by-recipients
927 @kbd{C-M-r @var{rcpts} @key{RET}} (@code{rmail-summary-by-recipients}) 927 @kbd{C-M-r @var{rcpts} @key{RET}} (@code{rmail-summary-by-recipients})
928makes a partial summary mentioning only the messages that have one or 928makes a partial summary mentioning only the messages that have one or
929more recipients matching the regular expression @var{rcpts}. You can 929more recipients matching the regular expression @var{rcpts}. This is matched
930use commas to separate multiple regular expressions. These are matched
931against the @samp{To}, @samp{From}, and @samp{CC} headers (supply a prefix 930against the @samp{To}, @samp{From}, and @samp{CC} headers (supply a prefix
932argument to exclude this header). 931argument to exclude this header).
933 932
@@ -935,9 +934,8 @@ argument to exclude this header).
935@findex rmail-summary-by-topic 934@findex rmail-summary-by-topic
936 @kbd{C-M-t @var{topic} @key{RET}} (@code{rmail-summary-by-topic}) 935 @kbd{C-M-t @var{topic} @key{RET}} (@code{rmail-summary-by-topic})
937makes a partial summary mentioning only the messages whose subjects have 936makes a partial summary mentioning only the messages whose subjects have
938a match for the regular expression @var{topic}. You can use commas to 937a match for the regular expression @var{topic}. With a prefix argument,
939separate multiple regular expressions. With a prefix argument, the 938the match is against the whole message, not just the subject.
940match is against the whole message, not just the subject.
941 939
942@kindex C-M-s @r{(Rmail)} 940@kindex C-M-s @r{(Rmail)}
943@findex rmail-summary-by-regexp 941@findex rmail-summary-by-regexp
@@ -950,8 +948,7 @@ expression @var{regexp}.
950@findex rmail-summary-by-senders 948@findex rmail-summary-by-senders
951 @kbd{C-M-f @var{senders} @key{RET}} (@code{rmail-summary-by-senders}) 949 @kbd{C-M-f @var{senders} @key{RET}} (@code{rmail-summary-by-senders})
952makes a partial summary that mentions only the messages whose @samp{From} 950makes a partial summary that mentions only the messages whose @samp{From}
953fields match the regular expression @var{senders}. You can use commas to 951fields match the regular expression @var{senders}.
954separate multiple regular expressions.
955 952
956 Note that there is only one summary buffer for any Rmail buffer; 953 Note that there is only one summary buffer for any Rmail buffer;
957making any kind of summary discards any previous summary. 954making any kind of summary discards any previous summary.
diff --git a/etc/NEWS b/etc/NEWS
index 1cccc317ab5..24f6d582dcc 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -520,16 +520,21 @@ alternatives to currently visited manuals.
520--- 520---
521** ntlm.el has support for NTLM2. 521** ntlm.el has support for NTLM2.
522 522
523--- 523** Rmail
524** The Rmail commands d, C-d and u now handle repeat counts to delete or 524
525*** The Rmail commands d, C-d and u take optional repeat counts to delete or
525undelete multiple messages. 526undelete multiple messages.
526 527
527** Rmail can now render HTML mail messages if your Emacs was built with 528*** Rmail can now render HTML mail messages if your Emacs was built with
528libxml2 or if you have the Lynx browser installed. By default, Rmail 529libxml2 or if you have the Lynx browser installed. By default, Rmail
529will display the HTML version of a mail message that has both HTML and 530will display the HTML version of a mail message that has both HTML and
530plain text parts, if display of HTML email is possible; customize the 531plain text parts, if display of HTML email is possible; customize the
531`rmail-mime-prefer-html' option to `nil' if you don't want that. 532`rmail-mime-prefer-html' option to `nil' if you don't want that.
532 533
534+++
535*** In the commands that make summaries by subject, recipients, or senders,
536you can no longer use commas to separate regular expressions.
537
533** SES now supports local printer functions; see `ses-define-local-printer'. 538** SES now supports local printer functions; see `ses-define-local-printer'.
534 539
535** In sh-mode, you can now use `sh-shell' as a file-local variable to 540** In sh-mode, you can now use `sh-shell' as a file-local variable to
@@ -875,9 +880,6 @@ permissions set to temporary values (e.g., for creating private files).
875 880
876** You can access the slots of structures using `cl-struct-slot-value'. 881** You can access the slots of structures using `cl-struct-slot-value'.
877 882
878** Functions `rmail-delete-forward' and `rmail-delete-backward' take an
879optional repeat-count argument.
880
881** Function `sort' can deal with vectors. 883** Function `sort' can deal with vectors.
882 884
883** Function `system-name' now returns an updated value if the current 885** Function `system-name' now returns an updated value if the current
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 7097fef9ada..ed4d58c9505 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -287,23 +287,20 @@ LABELS should be a string containing the desired labels, separated by commas."
287 (mail-comma-list-regexp labels) 287 (mail-comma-list-regexp labels)
288 "\\)\\(,\\|\\'\\)"))) 288 "\\)\\(,\\|\\'\\)")))
289 289
290;; FIXME "a string of regexps separated by commas" makes no sense because:
291;; i) it's pointless (you can just use \\|)
292;; ii) it's broken (you can't specify a literal comma)
293;; rmail-summary-by-topic and rmail-summary-by-senders have the same issue.
294;;;###autoload 290;;;###autoload
295(defun rmail-summary-by-recipients (recipients &optional primary-only) 291(defun rmail-summary-by-recipients (recipients &optional primary-only)
296 "Display a summary of all messages with the given RECIPIENTS. 292 "Display a summary of all messages with the given RECIPIENTS.
297Normally checks the To, From and Cc fields of headers; 293Normally checks the To, From and Cc fields of headers;
298but if PRIMARY-ONLY is non-nil (prefix arg given), 294but if PRIMARY-ONLY is non-nil (prefix arg given),
299 only look in the To and From fields. 295 only look in the To and From fields.
300RECIPIENTS is a string of regexps separated by commas." 296RECIPIENTS is a regular expression."
301 (interactive "sRecipients to summarize by: \nP") 297 (interactive "sRecipients to summarize by: \nP")
302 (rmail-new-summary 298 (rmail-new-summary
303 (concat "recipients " recipients) 299 (concat "recipients " recipients)
304 (list 'rmail-summary-by-recipients recipients primary-only) 300 (list 'rmail-summary-by-recipients recipients primary-only)
305 'rmail-message-recipients-p 301 'rmail-message-recipients-p
306 (mail-comma-list-regexp recipients) primary-only)) 302 (replace-regexp-in-string "\\`[ \t]*\\(.*?\\)[ \t]*\\'" "\\1" recipients)
303 primary-only))
307 304
308(defun rmail-message-recipients-p (msg recipients &optional primary-only) 305(defun rmail-message-recipients-p (msg recipients &optional primary-only)
309 (rmail-apply-in-message msg 'rmail-message-recipients-p-1 306 (rmail-apply-in-message msg 'rmail-message-recipients-p-1
@@ -370,7 +367,7 @@ Emacs will list the message in the summary."
370 "Display a summary of all messages with the given SUBJECT. 367 "Display a summary of all messages with the given SUBJECT.
371Normally checks just the Subject field of headers; but with prefix 368Normally checks just the Subject field of headers; but with prefix
372argument WHOLE-MESSAGE is non-nil, looks in the whole message. 369argument WHOLE-MESSAGE is non-nil, looks in the whole message.
373SUBJECT is a string of regexps separated by commas." 370SUBJECT is a regular expression."
374 (interactive 371 (interactive
375 ;; We quote the default subject, because if it contains regexp 372 ;; We quote the default subject, because if it contains regexp
376 ;; special characters (eg "?"), it can fail to match itself. (Bug#2333) 373 ;; special characters (eg "?"), it can fail to match itself. (Bug#2333)
@@ -383,7 +380,8 @@ SUBJECT is a string of regexps separated by commas."
383 (concat "about " subject) 380 (concat "about " subject)
384 (list 'rmail-summary-by-topic subject whole-message) 381 (list 'rmail-summary-by-topic subject whole-message)
385 'rmail-message-subject-p 382 'rmail-message-subject-p
386 (mail-comma-list-regexp subject) whole-message)) 383 (replace-regexp-in-string "\\`[ \t]*\\(.*?\\)[ \t]*\\'" "\\1" subject)
384 whole-message))
387 385
388(defun rmail-message-subject-p (msg subject &optional whole-message) 386(defun rmail-message-subject-p (msg subject &optional whole-message)
389 (if whole-message 387 (if whole-message
@@ -395,13 +393,13 @@ SUBJECT is a string of regexps separated by commas."
395;;;###autoload 393;;;###autoload
396(defun rmail-summary-by-senders (senders) 394(defun rmail-summary-by-senders (senders)
397 "Display a summary of all messages whose \"From\" field matches SENDERS. 395 "Display a summary of all messages whose \"From\" field matches SENDERS.
398SENDERS is a string of regexps separated by commas." 396SENDERS is a regular expression."
399 (interactive "sSenders to summarize by: ") 397 (interactive "sSenders to summarize by: ")
400 (rmail-new-summary 398 (rmail-new-summary
401 (concat "senders " senders) 399 (concat "senders " senders)
402 (list 'rmail-summary-by-senders senders) 400 (list 'rmail-summary-by-senders senders)
403 'rmail-message-senders-p 401 'rmail-message-senders-p
404 (mail-comma-list-regexp senders))) 402 (replace-regexp-in-string "\\`[ \t]*\\(.*?\\)[ \t]*\\'" "\\1" senders)))
405 403
406(defun rmail-message-senders-p (msg senders) 404(defun rmail-message-senders-p (msg senders)
407 (string-match senders (or (rmail-get-header "From" msg) ""))) 405 (string-match senders (or (rmail-get-header "From" msg) "")))