Hello,

I am using spamoracle to filter my spam (mainly because this is a
local product from inria), and have been very annoyed by the fact
that, when quitting a mail group, I see the message
  Registering 0 articles with classification spam, check spam-use-spamoracle

The problem is that spamoracle suffers from slow startup even when no
messages are passed to it and the maessage slows down gnus operation.
And anyway it seems kind of pointless.

I finally came up with the following trivial patch, which only
encloses the relevant code into a "(when articles ...)" block. I have
been using it for a year without problem. I do not know whether it can
cause problems to other spam filter, but it looks to me like a
reasonable thing to do anyway.

I am not sure whether this group is the right place to submit such a
patch. Please tell me where to send it and whether a different form
(changelog?) is needed.

Regards,
JMarc

Index: lisp/spam.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/spam.el,v
retrieving revision 6.146.2.22
diff -u -p -r6.146.2.22 spam.el
--- lisp/spam.el	24 Jan 2007 07:17:41 -0000	6.146.2.22
+++ lisp/spam.el	1 Aug 2007 12:52:36 -0000
@@ -1108,22 +1108,23 @@ functions")
 			   (spam-list-articles
 			    gnus-newsgroup-articles
 			    classification)))
-	;; process them
-	(gnus-message 5 "%s %d %s articles with classification %s, check %s"
-		      (if unregister "Unregistering" "Registering")
-		      (length articles)
-		      (if specific-articles "specific" "")
-		      (symbol-name classification)
-		      (symbol-name check))
-	(funcall run-function articles)
-	;; now log all the registrations (or undo them, depending on unregister)
-	(dolist (article articles)
-	  (funcall log-function
-		   (spam-fetch-field-message-id-fast article)
-		   'process
-		   classification
-		   check
-		   gnus-newsgroup-name))))))
+	(when articles
+	  ;; process them
+	  (gnus-message 5 "%s %d %s articles with classification %s, check %s"
+			(if unregister "Unregistering" "Registering")
+			(length articles)
+			(if specific-articles "specific" "")
+			(symbol-name classification)
+			(symbol-name check))
+	  (funcall run-function articles)
+	  ;; now log all the registrations (or undo them, depending on unregister)
+	  (dolist (article articles)
+	    (funcall log-function
+		     (spam-fetch-field-message-id-fast article)
+		     'process
+		     classification
+		     check
+		     gnus-newsgroup-name)))))))
 
 ;;; log a ham- or spam-processor invocation to the registry
 (defun spam-log-processing-to-registry (id type classification check group)
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to