+2003-11-20 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el (spam-ham-copy-or-move-routine): add respooling
+ support, not working well yet
+
+ * gnus.el (ham-process-destination): make 'respool option the
+ only one, so it can't be chosen together with other groups
+
2003-11-19 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-registry.el (gnus-registry-track-extra): make it a set of
:tag "Destination for ham articles at summary exit from a spam group"
(string :tag "Move to a group")
(repeat :tag "Move to multiple groups"
- (choice
- (string :tag "Destination group")
- (const :tag "Respool" respool)))
+ (string :tag "Destination group"))
(const :tag "Respool" respool)
(const :tag "Do nothing" nil))
:function-document
:tag "Destination for ham articles at summary exit from spam group"
(string :tag "Move to a group")
(repeat :tag "Move to multiple groups"
- (choice
- (string :tag "Destination group")
- (const :tag "Respool" respool)))
+ (string :tag "Destination group"))
(const :tag "Respool" respool)
(const :tag "Expire" nil))))
:parameter-document
(backend-supports-deletions
(gnus-check-backend-function
'request-move-article gnus-newsgroup-name))
- article mark todo deletep)
+ (respool-method (gnus-find-method-for-group gnus-newsgroup-name))
+ article mark todo deletep respool)
(dolist (article articles)
(when (spam-group-ham-mark-p gnus-newsgroup-name
(gnus-summary-article-mark article))
(push article todo)))
+ (when (member 'respool groups)
+ (setq respool t) ; boolean for later
+ (setq groups '("fake"))) ; when respooling, groups are dynamic so fake it
+
;; now do the actual move
(dolist (group groups)
(when (and todo (stringp group))
(gnus-summary-mark-article article gnus-unread-mark))
(gnus-summary-set-process-mark article))
- (if (or (not backend-supports-deletions)
- (> (length groups) 1))
- (progn
- (gnus-summary-copy-article nil group)
- (setq deletep t))
- (gnus-summary-move-article nil group))))
+ (if respool ; respooling is with a "fake" group
+ (gnus-summary-respool-article nil respool-method)
+ (if (or (not backend-supports-deletions) ; else, we are not respooling
+ (> (length groups) 1))
+ (progn ; if copying, copy and set deletep
+ (gnus-summary-copy-article nil group)
+ (setq deletep t))
+ (gnus-summary-move-article nil group))))) ; else move articles
;; now delete the articles, unless a) copy is t, and there was a copy done
;; b) a move was done to a single group