From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62954 Path: news.gmane.org!not-for-mail From: "Ted Zlatanov" Newsgroups: gmane.emacs.gnus.general Subject: Re: spam.el not saving spam-stat dictionary Date: 20 Apr 2006 14:42:48 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <4nbquwxf4n.fsf@asimov.bwh.harvard.edu> References: <873bncpz21.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145558609 7897 80.91.229.2 (20 Apr 2006 18:43:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Apr 2006 18:43:29 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+m11481@lists.math.uh.edu Thu Apr 20 20:43:29 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FWe7X-00008a-Hj for ding-account@gmane.org; Thu, 20 Apr 2006 20:43:16 +0200 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 1FWe7N-0002Zq-00; Thu, 20 Apr 2006 13:43:05 -0500 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FWe6B-0002Zl-00 for ding@lists.math.uh.edu; Thu, 20 Apr 2006 13:41:51 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1FWe68-0001Rj-OJ for ding@lists.math.uh.edu; Thu, 20 Apr 2006 13:41:51 -0500 Original-Received: from clifford.bwh.harvard.edu ([134.174.9.41] helo=mail.bwh.harvard.edu) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FWe65-00057g-00 for ; Thu, 20 Apr 2006 20:41:45 +0200 Original-Received: (qmail 12136 invoked from network); 20 Apr 2006 18:34:14 -0000 Envelope-Sender: tzz@lifelogs.com Envelope-Recipients: cyd@stupidchicken.com, ding@gnus.org, Original-Received: from asimov.bwh.harvard.edu ([134.174.54.119]) (envelope-sender ) by mail.bwh.harvard.edu (qmail-ldap-1.03) with SMTP for ; 20 Apr 2006 18:34:14 -0000 Mail-Followup-To: "Chong Yidong" , ding@gnus.org Original-To: "Chong Yidong" 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" In-Reply-To: <873bncpz21.fsf@stupidchicken.com> (Chong Yidong's message of "Fri, 07 Oct 2005 21:39:18 -0400") User-Agent: Gnus/5.110005 (No Gnus v0.5) Emacs/22.0.50 (gnu/linux) X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:62954 Archived-At: On 7 Oct 2005, cyd@stupidchicken.com wrote: > I've been trying to set up the spam-stat spam filtering library, and I > noticed that the new emails I receive aren't being saved into the > spam-stat dictionary. From what I gather, emails that I mark as spam > are supposed to be "taught" to the dictionary as spam, and the rest of > the email as ham. In practice, ~/.spam-stat.el hasn't changed since I > first initialized it. > > After digging around, I found the follow suspicious code in > `spam-summary-prepare-exit': > > > (dolist (article changed-articles) > (let ((id (spam-fetch-field-message-id-fast article))) > (when (spam-log-unregistration-needed-p > id 'process classification check) > (push article unregister-list)))) > (when (and unregister-list (symbol-value check)) > (spam-register-routine classification check t unregister-list) > > The call to spam-register-routine is intended to save the article's > contents to the spam-stat dictionary. > > However, in practice unregister-list is always nil, because > spam-log-unregistration-needed-p is defined as > > (defun spam-log-unregistration-needed-p (id type classification check) > (when spam-log-to-registry > ....)) > > And spam-log-to-registry defaults to nil. Nothing ever gets pushed > onto unregister-list, and spam-register-routine is never called! > Surely this can't be the intended result? Chong, The code you reference is not in the Gnus CVS, but in the 5-10 branch. The latest spam.el doesn't have this bug, I believe. As for the actual bug you refer to, this is unregistration, where spam-register-routine is called to unregister articles (in the spam-stat case, to remove stats). I think you want to debug the following parts of the function and there you'll find the reasons why you are not getting things into your dictionary. In the latest spam.el I do registration/unregistration in a much cleaner (IMHO) way, so it should work properly regardless. This is one of the reasons I wanted to put the latest spam*.el code in Emacs CVS and the 5-10, the backend code is just much cleaner. Ted