forwarded 540234
http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3987
tags 540234 + fixed-upstream
thanks
On 2009-08-06 20:05 +0200, Jeroen Nijhof wrote:
> Package: emacs23-common
> Version: 23.1+1-2
> Severity: normal
> Tags: patch
>
> rmail-summary can't parse the Date: lines in my RMAIL etc:
> it only looks for lower case month names. So it gets stuck on my
> 'Date:' lines, which look like "Date: Thu, 06 Aug 2009 18:33:32 +0100".
>
> Solution: also look for capitalised month names.
The best way to do this is to bind case-fold-search to t, as in the
following patch that has been installed into the Emacs trunk:
--8<---------------cut here---------------start------------->8---
Index: rmailsum.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/rmailsum.el,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -r1.179 -r1.180
--- rmailsum.el 4 Apr 2009 14:21:49 -0000 1.179
+++ rmailsum.el 1 Aug 2009 08:20:17 -0000 1.180
@@ -518,16 +518,19 @@
(concat (save-excursion
(if (not (re-search-forward "^Date:" nil t))
" "
- (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([-
\t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)"
- (line-end-position) t)
+ ;; Match month names case-insensitively
+ (cond ((let ((case-fold-search t))
+ (re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([-
\t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)"
+ (line-end-position) t))
(format "%2d-%3s"
(string-to-number (buffer-substring
(match-beginning 2)
(match-end 2)))
(buffer-substring
(match-beginning 4) (match-end 4))))
- ((re-search-forward
"\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z
\t_]*\\)\\([0-9][0-9]?\\)"
- (line-end-position) t)
+ ((let ((case-fold-search t))
+ (re-search-forward
"\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z
\t_]*\\)\\([0-9][0-9]?\\)"
+ (line-end-position) t))
(format "%2d-%3s"
(string-to-number (buffer-substring
(match-beginning 4)
--8<---------------cut here---------------end--------------->8---
Cheers,
Sven
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]