From: Josh Huber <huber@alum.wpi.edu>
Subject: Re: expiry problems?
Date: Fri, 09 Nov 2001 18:00:23 -0500 [thread overview]
Message-ID: <87wv0z35yw.fsf@mclinux.com> (raw)
In-Reply-To: <874ro369fj.fsf@squeaker.lickey.com>
"Matt Armstrong" <matt+dated+1007925443.50f781@lickey.com> 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" <first article in nnml directory>
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 <huber@alum.wpi.edu>
+
+ * nnmail.el (nnmail-expired-article-p): Add case for files older
+ than 1970.
+
2001-11-09 Simon Josefsson <jas@extundo.com>
* 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
next prev parent reply other threads:[~2001-11-09 23:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-09 14:32 Josh Huber
2001-11-09 15:53 ` Harry Putnam
2001-11-09 16:56 ` Matt Armstrong
2001-11-09 18:09 ` Josh Huber
2001-11-09 19:17 ` Matt Armstrong
2001-11-09 23:00 ` Josh Huber [this message]
2001-11-10 11:11 ` Simon Josefsson
2001-11-10 17:52 ` Josh Huber
2001-11-10 19:04 ` Simon Josefsson
2001-11-21 6:32 ` Stephen J. Turnbull
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wv0z35yw.fsf@mclinux.com \
--to=huber@alum.wpi.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).