🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #1558

fix to rmail-convert-to-babyl-format

#1558
From: Johan Vromans
Date: Thu, 06 Apr 1989 13:22
56 lines
2650 bytes
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
Technical Details
Message-ID: <3002@mhres.mh.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!hp4nl!mhres!jv

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!hp4nl!mhres!jv
From: jv@mhres.mh.nl (Johan Vromans)
Newsgroups: gnu.emacs.bug
Subject: fix to rmail-convert-to-babyl-format
Message-ID: <3002@mhres.mh.nl>
Date: 6 Apr 89 13:22:47 GMT
Organization: Multihouse NV, the Netherlands
Lines: 56