+2005-10-27 Jouni K Seppanen <jks@iki.fi> (tiny change)
+
+ * nnimap.el (nnimap-search-uids-not-since-is-evil): Add variable.
+ (nnimap-request-expire-articles): Use it to avoid sending 'UID
+ SEARCH UID ... NOT SINCE' queries, for inefficient servers like
+ Courier IMAP ("some version from 2004"). Mostly based on similar
+ code in the same function.
+
2005-10-26 Didier Verna <didier@xemacs.org>
* gnus-group.el (gnus-group-compact-group): invalidate original
Unlike other backends, you do not need to take special care if you
flip this variable.")
+(defvoo nnimap-search-uids-not-since-is-evil nil
+ "If non-nil, avoid \"UID SEARCH UID ... NOT SINCE\" queries when expiring.
+Instead, use \"UID SEARCH SINCE\" to prune the list of expirable
+articles within Gnus. This seems to be faster on Courier in some cases.")
+
(defvoo nnimap-expunge-on-close 'always ; 'ask, 'never
"Whether to expunge a group when it is closed.
When a IMAP group with articles marked for deletion is closed, this
(gnus-compress-sequence oldarts)) "\\Deleted")
(setq articles (gnus-set-difference
articles oldarts))))))
+ ((and nnimap-search-uids-not-since-is-evil (numberp days))
+ (let* ((all-new-articles
+ (gnus-compress-sequence
+ (imap-search (format "SINCE %s"
+ (nnimap-date-days-ago days)))))
+ (oldartseq
+ (gnus-range-difference artseq all-new-articles))
+ (oldarts (gnus-uncompress-range oldartseq)))
+ (when oldarts
+ (nnimap-expiry-target oldarts group server)
+ (when (imap-message-flags-add
+ (imap-range-to-message-set oldartseq)
+ "\\Deleted")
+ (setq articles (gnus-set-difference
+ articles oldarts))))))
((numberp days)
(let ((oldarts (imap-search
(format nnimap-expunge-search-string