jv@mhres.mh.nl (Johan Vromans) (04/06/89)
Background: GNU Emacs 18.53. Some mailing systems apparently produce "From_" lines with a trailing blank following the year number, causing rmail-convert-to-babyl-format to fail on this header: "From hp4nl.nluug.nl!tde.uts.amdahl.com!tron Mon Apr 3 16:23:29 1989 " ----------------------------------------------------------------^ Has anyone else encountered this problem? I don't know who is to blame, but a simple (and rather trivial) patch to rmail.el fixes the problem: *** /u2/GNUemacs/emacs-18.53/lisp/rmail.el Thu Mar 2 16:38:05 1989 --- elisp/global/rmail.el Thu Apr 6 15:00:13 1989 *************** *** 549,555 **** (concat "^[\^_]?\\(" "From [^ \n]*\\(\\|\".*\"[^ \n]*\\) ?[^ \n]* [^ \n]* *" "[0-9]* [0-9:]* \\([A-Z]?[A-Z][A-Z]T \\|[-+][0-9][0-9][0-9][0-9] \\|\\)" ; EDT, -0500 ! "19[0-9]*$\\|" mmdf-delim1 "\\|" "^Babyl Options:\\|" "\^L\n[01],\\)") nil t) --- 549,555 ---- (concat "^[\^_]?\\(" "From [^ \n]*\\(\\|\".*\"[^ \n]*\\) ?[^ \n]* [^ \n]* *" "[0-9]* [0-9:]* \\([A-Z]?[A-Z][A-Z]T \\|[-+][0-9][0-9][0-9][0-9] \\|\\)" ; EDT, -0500 ! "19[0-9]* *$\\|" mmdf-delim1 "\\|" "^Babyl Options:\\|" "\^L\n[01],\\)") nil t) *************** *** 592,598 **** (goto-char start)) (let ((case-fold-search nil)) (if (re-search-forward ! "^From \\([^ ]*\\(\\|\".*\"[^ ]*\\)\\) ?\\([^ ]*\\) \\([^ ]*\\) *\\([0-9]*\\) \\([0-9:]*\\)\\( [A-Z]?[A-Z][A-Z]T\\|[-+][0-9][0-9][0-9][0-9]\\|\\) 19\\([0-9]*\\)\n" nil t) (replace-match (concat ;; Keep and reformat the date if we don't --- 592,598 ---- (goto-char start)) (let ((case-fold-search nil)) (if (re-search-forward ! "^From \\([^ ]*\\(\\|\".*\"[^ ]*\\)\\) ?\\([^ ]*\\) \\([^ ]*\\) *\\([0-9]*\\) \\([0-9:]*\\)\\( [A-Z]?[A-Z][A-Z]T\\|[-+][0-9][0-9][0-9][0-9]\\|\\) 19\\([0-9]*\\) *\n" nil t) (replace-match (concat ;; Keep and reformat the date if we don't -- Johan Vromans jv@mh.nl via european backbone (mcvax) Multihouse Automatisering bv uucp: ..!{mcvax,hp4nl}!mh.nl!jv Doesburgweg 7 phone: +31 1820 62944 2803 PL Gouda - The Netherlands fax: +31 1820 62500