number of processed spam messages.
(spam-ham-copy-or-move-routine): Return the number of processed
ham messages.
(spam-summary-prepare-exit): Use the above values to decide
whether status messages shouled be displayed.
+2004-05-20 TSUCHIYA Masatoshi <tsuchiya@namazu.org>
+
+ * spam.el (spam-mark-spam-as-expired-and-move-routine): Return the
+ number of processed spam messages.
+ (spam-ham-copy-or-move-routine): Return the number of processed
+ ham messages.
+ (spam-summary-prepare-exit): Use the above values to decide
+ whether status messages shouled be displayed.
+
2004-05-20 Katsumi Yamaoka <yamaoka@jpl.org>
* rfc2047.el (rfc2047-encode-function-alist): Renamed from
2004-05-20 Katsumi Yamaoka <yamaoka@jpl.org>
* rfc2047.el (rfc2047-encode-function-alist): Renamed from
;; call spam-register-routine with specific articles to unregister,
;; when there are articles to unregister and the check is enabled
(when (and unregister-list (symbol-value check))
;; call spam-register-routine with specific articles to unregister,
;; when there are articles to unregister and the check is enabled
(when (and unregister-list (symbol-value check))
classification check t unregister-list))))))
;; find all the spam processors applicable to this group
classification check t unregister-list))))))
;; find all the spam processors applicable to this group
(unless (and spam-move-spam-nonspam-groups-only
(spam-group-spam-contents-p gnus-newsgroup-name))
(unless (and spam-move-spam-nonspam-groups-only
(spam-group-spam-contents-p gnus-newsgroup-name))
- (when (< 0 (length (spam-list-articles
- gnus-newsgroup-articles
- 'spam)))
- (gnus-message 6 "Marking spam as expired and moving it to %s"
- (gnus-parameter-spam-process-destination
- gnus-newsgroup-name))
- (spam-mark-spam-as-expired-and-move-routine
- (gnus-parameter-spam-process-destination gnus-newsgroup-name))))
+ (let* ((group (gnus-parameter-spam-process-destination
+ gnus-newsgroup-name))
+ (num (spam-mark-spam-as-expired-and-move-routine group)))
+ (when (> num 0)
+ (gnus-message 6
+ "%d spam messages are marked as expired and moved it to %s"
+ num group))))
;; now we redo spam-mark-spam-as-expired-and-move-routine to only
;; expire spam, in case the above did not expire them
;; now we redo spam-mark-spam-as-expired-and-move-routine to only
;; expire spam, in case the above did not expire them
- (when (< 0 (length (spam-list-articles
- gnus-newsgroup-articles
- 'spam)))
- (gnus-message 6 "Marking spam as expired without moving it")
- (spam-mark-spam-as-expired-and-move-routine nil))
+ (let ((num (spam-mark-spam-as-expired-and-move-routine nil)))
+ (when (> num 0)
+ (gnus-message 6
+ "%d spam messages are markd as expired without moving it"
+ num)))
(when (or (spam-group-ham-contents-p gnus-newsgroup-name)
(and (spam-group-spam-contents-p gnus-newsgroup-name)
(when (or (spam-group-ham-contents-p gnus-newsgroup-name)
(and (spam-group-spam-contents-p gnus-newsgroup-name)
(spam-group-processor-p gnus-newsgroup-name processor))
(spam-register-routine classification check)))))
(spam-group-processor-p gnus-newsgroup-name processor))
(spam-register-routine classification check)))))
- (when (< 0 (length (spam-list-articles
- gnus-newsgroup-articles
- 'ham)))
- (when (spam-group-ham-processor-copy-p gnus-newsgroup-name)
- (gnus-message 6 "Copying ham")
- (spam-ham-copy-routine
- (gnus-parameter-ham-process-destination gnus-newsgroup-name)))
-
- ;; now move all ham articles out of spam groups
- (when (spam-group-spam-contents-p gnus-newsgroup-name)
- (gnus-message 6 "Moving ham messages from spam group")
- (spam-ham-move-routine
- (gnus-parameter-ham-process-destination gnus-newsgroup-name)))))
+ (when (spam-group-ham-processor-copy-p gnus-newsgroup-name)
+ (let ((num
+ (spam-ham-copy-routine
+ (gnus-parameter-ham-process-destination gnus-newsgroup-name))))
+ (when (> num 0)
+ (gnus-message 6 "%d ham messages are copied" num))))
+
+ ;; now move all ham articles out of spam groups
+ (when (spam-group-spam-contents-p gnus-newsgroup-name)
+ (let ((num
+ (spam-ham-move-routine
+ (gnus-parameter-ham-process-destination gnus-newsgroup-name))))
+ (when (> num 0)
+ (gnus-message 6 "%d ham messages are moved from spam group" num)))))
(setq spam-old-ham-articles nil)
(setq spam-old-spam-articles nil))
(setq spam-old-ham-articles nil)
(setq spam-old-spam-articles nil))
(let ((gnus-novice-user nil)) ; don't ask me if I'm sure
(gnus-summary-delete-article nil))))
(let ((gnus-novice-user nil)) ; don't ask me if I'm sure
(gnus-summary-delete-article nil))))
- (gnus-summary-yank-process-mark))))
+ (gnus-summary-yank-process-mark)
+ (length tomove))))
(defun spam-ham-copy-or-move-routine (copy groups)
(gnus-summary-kill-process-mark)
(defun spam-ham-copy-or-move-routine (copy groups)
(gnus-summary-kill-process-mark)
(gnus-summary-set-process-mark article))
(when todo
(let ((gnus-novice-user nil)) ; don't ask me if I'm sure
(gnus-summary-set-process-mark article))
(when todo
(let ((gnus-novice-user nil)) ; don't ask me if I'm sure
- (gnus-summary-delete-article nil))))))
+ (gnus-summary-delete-article nil)))))
- (gnus-summary-yank-process-mark))
+ (gnus-summary-yank-process-mark)
+ (length todo)))
(defun spam-ham-copy-routine (&rest groups)
(if (and (car-safe groups) (listp (car-safe groups)))
(defun spam-ham-copy-routine (&rest groups)
(if (and (car-safe groups) (listp (car-safe groups)))