(let ((result (nnimap-possibly-change-group group server))
parts structure)
(when (stringp article)
- (setq article (nnimap-find-article-by-message-id group article)))
+ (setq article (nnimap-find-article-by-message-id group server article)))
(when (and result
article)
(erase-buffer)
(when (nnimap-possibly-change-group group server)
(with-current-buffer (nnimap-buffer)
(when (stringp article)
- (setq article (nnimap-find-article-by-message-id group article)))
+ (setq article (nnimap-find-article-by-message-id group server article)))
(if (null article)
nil
(nnimap-get-whole-article
(cons internal-move-group
(or (nnimap-find-uid-response "COPYUID" (cadr result))
(nnimap-find-article-by-message-id
- internal-move-group message-id)))))
+ internal-move-group server message-id)))))
;; Move the article to a different method.
(let ((result (eval accept-form)))
(when result
(cdr (assoc "SEARCH" (cdr result))))))))))
-(defun nnimap-find-article-by-message-id (group message-id)
+(defun nnimap-find-article-by-message-id (group server message-id &optional recent)
+ "Search for message with MESSAGE-ID in GROUP from SERVER."
(with-current-buffer (nnimap-buffer)
(erase-buffer)
- (unless (equal group (nnimap-group nnimap-object))
- (setf (nnimap-group nnimap-object) nil)
- (setf (nnimap-examined nnimap-object) group)
- (nnimap-send-command "EXAMINE %S" (utf7-encode group t)))
+ (nnimap-possibly-change-group group server)
(let ((sequence
(nnimap-send-command "UID SEARCH HEADER Message-Id %S" message-id))
article result)
(cons group
(or (nnimap-find-uid-response "APPENDUID" (car result))
(nnimap-find-article-by-message-id
- group message-id))))))))))
+ group server message-id))))))))))
(defun nnimap-process-quirk (greeting-match type data)
(when (and (nnimap-greeting nnimap-object)