+2004-04-13 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el (spam-fetch-field-fast, spam-generate-fake-headers)
+ (spam-find-spam, spam-log-processing-to-registry)
+ (spam-log-registered-p, spam-log-unregistration-needed-p)
+ (spam-log-undo-registration): use gnus-message instead of
+ gnus-error, none of these errors are fatal
+
+ * gnus-registry.el (gnus-registry-clean-empty-function)
+ (gnus-registry-clean-empty): remove only empty entries without
+ extra data
+
2004-04-12 Teodor Zlatanov <tzz@lifelogs.com>
* spam-stat.el (spam-stat-buffer-change-to-spam)
(defcustom gnus-registry-clean-empty t
"Whether the empty registry entries should be deleted.
-Registry entries are considered empty when they have no groups."
+Registry entries are considered empty when they have no groups
+and no extra data."
:group 'gnus-registry
:type 'boolean)
(let ((count 0))
(maphash
(lambda (key value)
- (unless (gnus-registry-fetch-group key)
+ (unless (or
+ (gnus-registry-fetch-group key)
+ ;; TODO: look for specific extra data here!
+ ;; in this example, we look for 'label
+ (gnus-registry-fetch-extra key 'label))
(incf count)
(remhash key gnus-registry-hashtb)))
gnus-registry-hashtb)
(mail-header-extra data-header))
(t
nil))
- (gnus-error 5 "Article %d has a nil data header" article)))))
+ (gnus-message 5 "Article %d has a nil data header" article)))))
(defun spam-fetch-field-from-fast (article &optional prepared-data-header)
(spam-fetch-field-fast article 'from prepared-data-header))
(spam-fetch-field-fast article 'xref dh))
(when (spam-fetch-field-fast article 'extra dh)
(format "%s\n" (spam-fetch-field-fast article 'extra dh))))
- (gnus-error
+ (gnus-message
5
"spam-generate-fake-headers: article %d didn't have a valid header"
article))))
registry-lookup)
(unless id
- (gnus-error 5 "Article %d has no message ID!" article))
+ (gnus-message 5 "Article %d has no message ID!" article))
(when (and id spam-log-to-registry)
(setq registry-lookup (spam-log-registration-type id 'incoming))
type
cell-list))
- (gnus-error
+ (gnus-message
5
(format "%s call with bad ID, type, classification, spam-check, or group"
"spam-log-processing-to-registry")))))
(spam-process-type-valid-p type))
(cdr-safe (gnus-registry-fetch-extra id type))
(progn
- (gnus-error
+ (gnus-message
5
(format "%s called with bad ID, type, classification, or spam-check"
"spam-log-registered-p"))
(setq found t))))
found)
(progn
- (gnus-error
+ (gnus-message
5
(format "%s called with bad ID, type, classification, or spam-check"
"spam-log-unregistration-needed-p"))
type
new-cell-list))
(progn
- (gnus-error 5 (format "%s call with bad ID, type, spam-check, or group"
- "spam-log-undo-registration"))
+ (gnus-message 5 (format "%s call with bad ID, type, spam-check, or group"
+ "spam-log-undo-registration"))
nil))))
;;; set up IMAP widening if it's necessary