From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40177 Path: main.gmane.org!not-for-mail From: Josh Huber Newsgroups: gmane.emacs.gnus.general Subject: Re: expiry problems? Date: Fri, 09 Nov 2001 18:00:23 -0500 Organization: Mind your own business, you silly arthur king! Sender: owner-ding@hpc.uh.edu Message-ID: <87wv0z35yw.fsf@mclinux.com> References: <87668kggle.fsf@mclinux.com> <87adxvrihi.fsf@squeaker.lickey.com> <87itcjg6jy.fsf@mclinux.com> <874ro369fj.fsf@squeaker.lickey.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035175767 31913 80.91.224.250 (21 Oct 2002 04:49:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:49:27 +0000 (UTC) Return-Path: Original-Received: (qmail 19179 invoked from network); 9 Nov 2001 23:03:37 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 9 Nov 2001 23:03:37 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 162KdB-00061Z-00; Fri, 09 Nov 2001 17:00:13 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 09 Nov 2001 16:59:53 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id QAA07156 for ; Fri, 9 Nov 2001 16:59:38 -0600 (CST) Original-Received: (qmail 19118 invoked by alias); 9 Nov 2001 22:59:45 -0000 Original-Received: (qmail 19113 invoked from network); 9 Nov 2001 22:59:45 -0000 Original-Received: from quimby.gnus.org (HELO quimby2.netfonds.no) (195.204.10.66) by gnus.org with SMTP; 9 Nov 2001 22:59:45 -0000 Original-Received: from news by quimby2.netfonds.no with local (Exim 3.12 #1 (Debian)) id 162KgM-0000cp-00 for ; Sat, 10 Nov 2001 00:03:30 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 77 Original-NNTP-Posting-Host: lowell.missioncriticallinux.com Original-X-Trace: quimby2.netfonds.no 1005347009 2406 208.51.139.16 (9 Nov 2001 23:03:29 GMT) Original-X-Complaints-To: usenet@quimby2.netfonds.no Original-NNTP-Posting-Date: 9 Nov 2001 23:03:29 GMT X-Go-Away: or I shall taunt you a second time! X-PGP-KeyID: 6B21489A X-PGP-CertKey: 61F0 6138 BE7B FEBF A223 E9D1 BFE1 2065 6B21 489A X-Request-PGP: finger:huber@db.debian.org Mail-Copies-To: nobody User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Artificial Intelligence, powerpc-debian-linux) Cancel-Lock: sha1:QxPHjp8iapy2uEWuInc6Sv2TKGU= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40177 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40177 "Matt Armstrong" writes: > This is usually when I start making use of edebug-defun. ;-) indeed. after my first use of edebug, I've decided that it rocks :) I did manage to make xemacs segfault with it though :P What I realized, after tracing functions about 5 levels deep, is that the nnmail-expired-article-p function was returning nil for some articles that are older than 7 days. I noticed that it sorts the articles by number, then looks for the is-old parameter to turn false, at which point it doesn't check anymore. This is fine, except for the fact that the nnmail-expired-article-p function returns nil for VERY old articles. because of this piece of code: (time-less-p days (time-since time)) time-since returns a negative number for articles before 1970... touch -d "Jan 1 1940" and your articles will never be expired in that group. My clock must have been set wrong while those messages were created, and they're in each group I have keeping everything from being expired. anyway, here is my fix, should I commit? I'm asking since it really seems like a hack. The real fix is probably to time-since... Index: ChangeLog =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v retrieving revision 6.844 diff -u -r6.844 ChangeLog --- ChangeLog 2001/11/09 21:58:45 6.844 +++ ChangeLog 2001/11/09 22:59:04 @@ -1,3 +1,8 @@ +2001-11-09 Josh Huber + + * nnmail.el (nnmail-expired-article-p): Add case for files older + than 1970. + 2001-11-09 Simon Josefsson * gnus.el (gnus-local-domain): Fix doc. From Pavel Janík Index: nnmail.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnmail.el,v retrieving revision 6.27 diff -u -r6.27 nnmail.el --- nnmail.el 2001/09/26 17:55:05 6.27 +++ nnmail.el 2001/11/09 22:59:04 @@ -1687,7 +1687,12 @@ ((numberp days) (setq days (days-to-time days)) ;; Compare the time with the current time. - (ignore-errors (time-less-p days (time-since time)))))))) + (let ((since (time-since time))) + (ignore-errors + ;; if time-since returns a negative value the date is + ;; before 1970, and is obviouly ready to expire. + (or (> 0 (car since)) + (time-less-p days since))))))))) (defun nnmail-expiry-target-group (target group) ;; Do not invoke this from nntp-server-buffer! At least nnfolder clears -- Josh Huber