From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57172 Path: main.gmane.org!not-for-mail From: TSUCHIYA Masatoshi Newsgroups: gmane.emacs.gnus.general Subject: recheck arguments for commands to display spamicity scores Date: Sat, 01 May 2004 00:18:52 +0900 Sender: ding-owner@lists.math.uh.edu Message-ID: <87isfhbijn.fsf@namazu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083338385 25284 80.91.224.253 (30 Apr 2004 15:19:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Apr 2004 15:19:45 +0000 (UTC) Original-X-From: ding-owner+M5712@lists.math.uh.edu Fri Apr 30 17:19:24 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 1BJZnP-0004MG-00 for ; Fri, 30 Apr 2004 17:19:23 +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 1BJZn8-0005YW-00; Fri, 30 Apr 2004 10:19:06 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BJZn0-0005YQ-00 for ding@lists.math.uh.edu; Fri, 30 Apr 2004 10:18:58 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BJZmz-0005eT-19 for ding@lists.math.uh.edu; Fri, 30 Apr 2004 10:18:57 -0500 Original-Received: from pine.kuee.kyoto-u.ac.jp (pine.kuee.kyoto-u.ac.jp [130.54.208.130]) by justine.libertine.org (Postfix) with SMTP id 2CD6E3A0045 for ; Fri, 30 Apr 2004 10:18:55 -0500 (CDT) Original-Received: (qmail 992 invoked from network); 30 Apr 2004 15:18:53 -0000 Original-Received: from unknown (HELO pine.kuee.kyoto-u.ac.jp) (130.54.208.130) by pine.kuee.kyoto-u.ac.jp with SMTP; 30 Apr 2004 15:18:53 -0000 Original-To: ding@gnus.org Mail-Followup-To: ding@gnus.org User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-Dispatcher: imput version 20031028(IM146) Original-Lines: 91 Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57172 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57172 Hi, I have added an optional argument `recheck', to `spam-generic-score', `spam-bogofilter-score' and `spam-spamassassin-score'. This argument means that they recalcurate spamicity scores using the current spam databases even if target articles have spamicity score headers. I think that this argument is useful to check whether spam databases are updated properly. And more, I'd like to propose the patch attached at the last of this message, to change their default actions, because old spamicity scores kept by headers must be less important than ones calculated using the current updated database, when using spam detector based on headers, including `spam-use-bogofilter-headers'. Can I commit this change? -- TSUCHIYA Masatoshi --- spam.el 30 Apr 2004 14:33:58 -0000 7.33 +++ spam.el 30 Apr 2004 15:17:48 -0000 @@ -799,15 +799,15 @@ (return))) (or score 0))) -(defun spam-generic-score (&optional recheck) +(defun spam-generic-score (&optional use-header) "Invoke whatever scoring method we can." (interactive "P") (cond ((or spam-use-spamassassin spam-use-spamassassin-headers) - (spam-spamassassin-score recheck)) + (spam-spamassassin-score use-header)) ((or spam-use-bsfilter spam-use-bsfilter-headers) - (spam-bsfilter-score recheck)) - (t (spam-bogofilter-score recheck)))) + (spam-bsfilter-score use-header)) + (t (spam-bogofilter-score use-header)))) ;;; Summary entry and exit processing. @@ -2065,13 +2065,13 @@ spam-split-group))))) ;; return something sensible if the score can't be determined -(defun spam-bogofilter-score (&optional recheck) +(defun spam-bogofilter-score (&optional use-header) "Get the Bogofilter spamicity score" (interactive "P") (save-window-excursion (gnus-summary-show-article t) (set-buffer gnus-article-buffer) - (let ((score (or (unless recheck + (let ((score (or (when use-header (spam-check-bogofilter-headers t)) (spam-check-bogofilter t)))) (gnus-summary-show-article) @@ -2231,13 +2231,13 @@ (spam-check-spamassassin-headers score))))) ;; return something sensible if the score can't be determined -(defun spam-spamassassin-score (&optional recheck) +(defun spam-spamassassin-score (&optional use-header) "Get the SpamAssassin score" (interactive "P") (save-window-excursion (gnus-summary-show-article t) (set-buffer gnus-article-buffer) - (let ((score (or (unless recheck + (let ((score (or (when use-header (spam-check-spamassassin-headers t)) (spam-check-spamassassin t)))) (gnus-summary-show-article) @@ -2302,13 +2302,13 @@ spam-split-group))))) ;; return something sensible if the score can't be determined -(defun spam-bsfilter-score (&optional recheck) +(defun spam-bsfilter-score (&optional use-header) "Get the Bsfilter spamicity score" (interactive "P") (save-window-excursion (gnus-summary-show-article t) (set-buffer gnus-article-buffer) - (let ((score (or (unless recheck + (let ((score (or (when use-header (spam-check-bsfilter-headers t)) (spam-check-bsfilter t)))) (gnus-summary-show-article)