Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* spam.el not saving spam-stat dictionary
@ 2005-10-08 18:36 Chong Yidong
  0 siblings, 0 replies; only message in thread
From: Chong Yidong @ 2005-10-08 18:36 UTC (permalink / raw)


[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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-08 18:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-08 18:36 spam.el not saving spam-stat dictionary Chong Yidong

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).