From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/50359 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: spam.el is a bit aggressive loading/saving spam-stat data Date: Mon, 24 Feb 2003 16:53:14 -0500 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: owner-ding@hpc.uh.edu Message-ID: <4nisv91h2t.fsf@chubby.bwh.harvard.edu> References: <4nd6ll3bus.fsf@lockgroove.bwh.harvard.edu> <4nk7ft1hqj.fsf@lockgroove.bwh.harvard.edu> <874r6xtccq.fsf@emacswiki.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1046123699 25715 80.91.224.249 (24 Feb 2003 21:54:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 24 Feb 2003 21:54:59 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18nQYp-0006gA-00 for ; Mon, 24 Feb 2003 22:54:56 +0100 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 18nQXZ-00065g-00; Mon, 24 Feb 2003 15:53:37 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 24 Feb 2003 15:54:35 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id PAA07337 for ; Mon, 24 Feb 2003 15:54:20 -0600 (CST) Original-Received: (qmail 19889 invoked by alias); 24 Feb 2003 21:53:17 -0000 Original-Received: (qmail 19883 invoked from network); 24 Feb 2003 21:53:17 -0000 Original-Received: from clifford.bwh.harvard.edu (134.174.9.41) by 66.230.238.6 with SMTP; 24 Feb 2003 21:53:17 -0000 Original-Received: from chubby.bwh.harvard.edu (chubby [134.174.9.50]) by clifford.bwh.harvard.edu (8.10.2+Sun/8.11.0) with ESMTP id h1OLrFj02809 for ; Mon, 24 Feb 2003 16:53:15 -0500 (EST) Original-Received: (from tzz@localhost) by chubby.bwh.harvard.edu (8.11.6+Sun/8.11.0) id h1OLrEO10502; Mon, 24 Feb 2003 16:53:14 -0500 (EST) Original-To: ding@gnus.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: ding@gnus.org In-Reply-To: <874r6xtccq.fsf@emacswiki.org> (Alex Schroeder's message of "Sat, 22 Feb 2003 00:58:45 +0100") User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:50359 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:50359 On Sat, 22 Feb 2003, alex@emacswiki.org wrote: > The only problem is that when you quit Gnus without saving, then the > backends might have reclassified an article from spam to non-spam > (and moved the article physically from one group to another), but > the scores are unchanged. Depending on how you want to look at it, > it seems to me that the only good solution is this: > > Only save spam-stat data when newsrc is saved, and add some elisp to > .newsrc-dribble whenever articles are processed. Then the > information should be more or less in sync, as .newsrc-dribble gets > autosaved... Perhaps .newsrc-dribble gets saved whenever the > backends save something, I haven't investigated. That would be the > perfect solution, then. For now, I moved spam-stat-save out of the classification functions in spam.el, and added spam-stat-save to the gnus-save-newsrc-hook. The add-hook is done iff spam-use-stat is set. I am not sure how to handle a spam-stat .dribble, if you want to write that code (spam-stat-load-dribble, spam-stat-save-dribble) I'll be glad to trigger it from spam.el. Thanks Ted