On Sun, 06 Sep 2009 13:50:46 +0200, Adam wrote:
> On Sun, 06 Sep 2009 12:42:51 +0200, Adam wrote:
>> Looking in the code, unregistering seems to be handled for bogofilter:
> Ah, it is - but an article isn't unregistered if it is going from ham to
> spam, or spam to ham, because, in spam.el's spam-resolve-registrations-routine
> this happens:
> ;; eliminate duplicates
Here is a patch that makes that configurable (the name of the variable
should probably be better, and I don't know if this should be automatic
instead, perhaps when unregister is possible?):
diff --git a/lisp/spam.el b/lisp/spam.el
index e2d34b6..e136652 100644
--- a/lisp/spam.el
+++ b/lisp/spam.el
@@ -158,6 +158,12 @@ Normally this is nil, so only unseen messages will be
checked."
:type 'boolean
:group 'spam)
+(defcustom spam-unregister-on-reregister nil
+ "Whether to always unregister before reregistering (i.e. to
+unlearn when changing ham to spam or vice versa)."
+ :type 'boolean
+ :group 'spam)
+
(defcustom spam-whitelist (expand-file-name "whitelist" spam-directory)
"The location of the whitelist.
The file format is one regular expression per line.
@@ -1769,11 +1775,12 @@ See the Info node `(gnus)Fancy Mail Splitting' for more
details."
t)
;; eliminate duplicates
- (dolist (article (copy-sequence ulist))
- (when (memq article rlist)
- (incf delcount)
- (setq rlist (delq article rlist))
- (setq ulist (delq article ulist))))
+ (when (not spam-unregister-on-reregister)
+ (dolist (article (copy-sequence ulist))
+ (when (memq article rlist)
+ (incf delcount)
+ (setq rlist (delq article rlist))
+ (setq ulist (delq article ulist)))))
(unless (zerop delcount)
(gnus-message
--
1.6.3.3
--
"But after all, who is? At least in our case - no one Adam Sjøgren
is such a great musician. But we are stubborn." [email protected]
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english