From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57747 Path: main.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: spam.el calls spam registration routines even if no spam marked articles exist. Date: Thu, 27 May 2004 17:48:18 +1000 Sender: ding-owner@lists.math.uh.edu Message-ID: <8765ainwe5.fsf@enki.rimspace.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1085644960 2970 80.91.224.253 (27 May 2004 08:02:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 May 2004 08:02:40 +0000 (UTC) Original-X-From: ding-owner+M6288@lists.math.uh.edu Thu May 27 10:02:27 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BTFqN-0006ss-00 for ; Thu, 27 May 2004 10:02:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1BTFq5-00028U-00; Thu, 27 May 2004 03:02:09 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BTFq0-00028P-00 for ding@lists.math.uh.edu; Thu, 27 May 2004 03:02:05 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BTFq0-0006Qf-7c for ding@lists.math.uh.edu; Thu, 27 May 2004 03:02:04 -0500 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id CEDE13A006A for ; Thu, 27 May 2004 03:02:02 -0500 (CDT) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BTFpx-0004r8-00 for ; Thu, 27 May 2004 10:02:01 +0200 Original-Received: from 203-217-29-45.perm.iinet.net.au ([203.217.29.45]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 May 2004 10:02:01 +0200 Original-Received: from daniel by 203-217-29-45.perm.iinet.net.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 May 2004 10:02:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 64 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 203-217-29-45.perm.iinet.net.au Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEWMa2EhFxLannUABQUw Oku3ssL73NYZDAW2RuSFAAACdElEQVR42l2US2/bMAyAacNprlalIVeVSHKuIAO62o22XAOj7nkw YJ2jOUD//kjaSbsJCZTwM9+kAaDwfEyXq9l0/n4AYPnjOgNafQPD5bRqmLYzsdP/gxhJDIgwP4Dc WbUVAPaI2xVs3uVWhsTlMfVYraBefuS2xI+UpuFgF1vQSCCuPSY504CLTzByt5geYDEBjuO74eEb mL9AiaslIgjaZwKKPYjjO7DaVwJ2vinvlgScAgPvqn9Bb09uT0A3ewJfplJvt7d3NuUYfMkn6sMz A/rMDQwPue2genph0JTnK8Bm0Zmq2Jb2UAhoX9oqxsjm+ipC2duh0mzq1QICUC/IjjUW+7KnOhFw CIMt27E8jnikuPvNJSsuSSjtMA4fJB2lMvhU+Jk0tH+7SKVIKjXmmngNQfvrRRIfj2l5QOYJdt4H uAPRGLnrOzBMyhWkB8gQCfg3EazJj+dAoULH/XoW2yRDAcoHB4rBK2ctgNSw67zL0kHfHEmGi3+0 8cwBCXB4QKQ8RsoRbctu4SzDUpJcwqXLRjWHDMtA/kI+9Lw9ji8EslnBn4/RktZhohJvo9L5JuAz mCkto4WpV1HtlIJlB7qn1HNdxkPaO1qVuAITay574u/WVVDFxYe7QbGZyDl9phNr0LrMnPkVimuS wNJv7bh8ZOqTikIabu3fXnvlMw+DogcCFPOPZX4iT38uqOexpZ1qC93IZI0CrlUH2SiqSl2c/E8G VjavpoEiD2ftX6miDSVyAW5fgBKp50HvPk3d+VADtMAr2Vh5ETTeqXyN1E0+7KKmslE/nA/K1DAL 4JUN3AR69wSdY0E2aIZBXDjO9C9KCQDyFdsMXQAAAABJRU5ErkJggg== User-Agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:oUyKnzz0eVEbrKcn/LbwfTCaZLo= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57747 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57747 One of the things that bemused me when dealing with spam.el was that it calls the spam registration routine for the selected group even if there are no spam articles in that group. The attached patch avoids calling down into the underlying registration routine unless there is actually something to do. This check should, in fact, probably move up higher in the process, but that is much more major surgery on the code. Daniel Index: spam.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/spam.el,v retrieving revision 7.44 diff -u -u -r7.44 spam.el --- spam.el 26 May 2004 16:38:07 -0000 7.44 +++ spam.el 27 May 2004 07:46:06 -0000 @@ -1472,21 +1473,22 @@ gnus-newsgroup-articles classification))) ;; process them - (gnus-message 5 "%s %d %s articles as %s using backend %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 (> (length articles) 0) + (gnus-message 5 "%s %d %s articles as %s using backend %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) -- The problem with defending the purity of the English language is that English is about as pure as a cribhouse whore. We don't just borrow words; on occasion, English has pursued other languages down alleyways to beat them unconscious and rifle their pockets for new vocabulary. -- James D. Nicoll