From 62b55b56bed9e542e6f024f5307de196adf52d87 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Tue, 18 Mar 2014 09:50:53 +0800 Subject: [PATCH 2/2] Allow nnimap respooling requests to function correctly. --- lisp/nnimap.el | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 4e07495..1b7a623 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -48,6 +48,7 @@ (autoload 'auth-source-forget+ "auth-source") (autoload 'auth-source-search "auth-source") +(autoload 'nnml-active-number "nnml") (nnoo-declare nnimap) @@ -1118,11 +1119,21 @@ If LIMIT, first try to limit the search to the N last articles." (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)))))) + (let ((nnmail-split-methods + (cond + ((eq nnimap-split-methods 'default) + nnmail-split-methods) + (nnimap-split-methods + nnimap-split-methods) + (nnimap-split-fancy + 'nnmail-split-fancy))) + (nnmail-split-fancy (or nnimap-split-fancy + nnmail-split-fancy))) + (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) @@ -1157,7 +1168,7 @@ If LIMIT, first try to limit the search to the N last articles." (or (nnimap-find-uid-response "APPENDUID" (car result)) (nnimap-find-article-by-message-id group server message-id - nnimap-request-articles-find-limit)))))))))) + nnimap-request-articles-find-limit)))))))))) (defun nnimap-process-quirk (greeting-match type data) (when (and (nnimap-greeting nnimap-object) -- 1.9.0