From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61402 Path: news.gmane.org!not-for-mail From: Stefan Schimanski Newsgroups: gmane.emacs.gnus.general Subject: Patch to handle invalid dates during expiry Date: Sun, 20 Nov 2005 20:33:44 +0100 Message-ID: <874q679krr.fsf@1stein.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: sea.gmane.org 1132591792 17065 80.91.229.2 (21 Nov 2005 16:49:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2005 16:49:52 +0000 (UTC) Original-X-From: ding-owner+m9933@lists.math.uh.edu Mon Nov 21 17:49:49 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EeEhA-0001jW-0L for ding-account@gmane.org; Mon, 21 Nov 2005 17:39:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EeEgy-0008TV-00; Mon, 21 Nov 2005 10:38:56 -0600 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EduwZ-0006x0-00 for ding@lists.math.uh.edu; Sun, 20 Nov 2005 13:33:43 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1EduwX-00034x-Gw for ding@lists.math.uh.edu; Sun, 20 Nov 2005 13:33:43 -0600 Original-Received: from news by quimby.gnus.org with local (Exim 3.35 #1 (Debian)) id 1EduwW-0001Po-00 for ; Sun, 20 Nov 2005 20:33:40 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 57 Original-NNTP-Posting-Host: ppp-82-135-13-31.mnet-online.de Original-X-Trace: quimby.gnus.org 1132515220 5025 82.135.13.31 (20 Nov 2005 19:33:40 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Sun, 20 Nov 2005 19:33:40 +0000 (UTC) User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:eUHyITjH3bSf4QbvFZv+qGull3Y= X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61402 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Hi! Attached is a patch to nnmail.el to fix "Invalid Date" errors when the expire code hits messages with date headers which cannot be parsed by date-to-time. Stefan Schimanski --=-=-= Content-Disposition: inline; filename=nnmail.el.diff Content-Transfer-Encoding: quoted-printable Index: nnmail.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/cvsroot/gnus/lisp/nnmail.el,v retrieving revision 7.21 diff -u -p -B -w -r7.21 nnmail.el --- nnmail.el 4 Oct 2005 15:27:45 -0000 7.21 +++ nnmail.el 20 Nov 2005 19:22:21 -0000 @@ -1867,8 +1867,12 @@ See the Info node `(gnus)Fancy Mail Spli (case-fold-search nil) (from (or (message-fetch-field "from") "")) (to (or (message-fetch-field "to") "")) - (date (date-to-time - (or (message-fetch-field "date") (current-time-string)))) + (date=20 + (condition-case err + (date-to-time + (or (message-fetch-field "date") (current-time-string))) + (error (message "%s" (error-message-string err))=20 + (date-to-time (current-time-string))))) (target 'delete)) (dolist (regexp-target-pair (reverse nnmail-fancy-expiry-targets) targ= et) (setq header (car regexp-target-pair)) --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBDgM+YHUDhE+YrLEURAghbAJwNeKZKHDVEl2yYlUghqNFcpzfFTQCgqzkK 3UnN7KiRDzpKAB0OS7RyLtU= =fSuT -----END PGP SIGNATURE----- --==-=-=--