Misc changes made in Emacs trunk
[gnus] / lisp / nnimap.el
index f0accb9..1730bd4 100644 (file)
@@ -1115,6 +1115,14 @@ If LIMIT, first try to limit the search to the N last articles."
          (nnimap-wait-for-response sequence))))))
 
 (deffoo nnimap-request-accept-article (group &optional server last)
+  (unless group
+    ;; We're respooling.  Find out where mail splitting would place
+    ;; this article.
+    (setq group
+         (caar
+          (nnmail-article-group
+           `(lambda (group)
+              (nnml-active-number group ,server))))))
   (setq group (nnimap-decode-gnus-group group))
   (when (nnimap-change-group nil server)
     (nnmail-check-syntax)