Gnus development mailing list
 help / color / mirror / Atom feed
* recheck arguments for commands to display spamicity scores
@ 2004-04-30 15:18 TSUCHIYA Masatoshi
  2004-05-14 19:28 ` Ted Zlatanov
  0 siblings, 1 reply; 2+ messages in thread
From: TSUCHIYA Masatoshi @ 2004-04-30 15:18 UTC (permalink / raw)


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
\f
--- 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)



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: recheck arguments for commands to display spamicity scores
  2004-04-30 15:18 recheck arguments for commands to display spamicity scores TSUCHIYA Masatoshi
@ 2004-05-14 19:28 ` Ted Zlatanov
  0 siblings, 0 replies; 2+ messages in thread
From: Ted Zlatanov @ 2004-05-14 19:28 UTC (permalink / raw)


On Sat, 01 May 2004, tsuchiya@namazu.org wrote:

> I have added an optional argument `recheck', to
> `spam-generic-score', `spam-bogofilter-score' and
> `spam-spamassassin-score'.

I'm not sure I understand exactly what you're doing, the diff says
you're removing the "recheck" argument.

> 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?

I think the goal is good, can you check that your patch is correct
though?  I may be confused too easily :)

Ted



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-14 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-30 15:18 recheck arguments for commands to display spamicity scores TSUCHIYA Masatoshi
2004-05-14 19:28 ` Ted Zlatanov

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