From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/5852 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.gnus.user Subject: spam.el not saving spam-stat dictionary Date: Sat, 08 Oct 2005 14:36:01 -0400 Message-ID: <87wtknzwj2.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 1138671500 29113 80.91.229.2 (31 Jan 2006 01:38:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:38:20 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:35:55 2006 Original-Path: quimby.gnus.org!newsfeed.gazeta.pl!news.nask.pl!newsfeed.pionier.net.pl!newsfeed.gamma.ru!Gamma.RU!nntp.abs.net!news2.wam.umd.edu!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mail Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:2LCq9BkSEVwVkmQjeqKpAJtrBe4= Original-NNTP-Posting-Host: SYDNEYPACIFIC-FOUR-SEVENTY-ONE.MIT.EDU Original-X-Trace: 1128796566 senator-bedfellow.mit.edu 558 18.95.6.216 Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:5994 Original-Lines: 42 X-Gnus-Article-Number: 5994 Tue Jan 17 17:35:55 2006 Xref: news.gmane.org gmane.emacs.gnus.user:5852 Archived-At: [I sent this to gnus-ding yesterday, but I haven't been able to access the newsgroup so I dunno if it got through. Sorry for reposting.] I use the version of Gnus that comes with CVS Gnu Emacs. 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. The problem seems to lie in `spam-summary-prepare-exit' in spam.el: (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, unregister-list is actually 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! However, even setting the spam-log-to-registry to t does not fix the problem. I'll continue looking into this, but someone more familiar with the code would probably be able to find the problem faster. Thanks. -- Yidong