From 8f7952d82c5c6a342b12597a109f25c0ed072391 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Thu, 4 Nov 2010 21:07:01 +0100 Subject: [PATCH] Don't EXAMINE a group if it's already selected. --- lisp/ChangeLog | 3 +++ lisp/nnimap.el | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 93b87e953..288c1bd22 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-11-04 Lars Magne Ingebrigtsen + * nnimap.el (nnimap-find-article-by-message-id): Don't EXAMINE a group + if it's already selected. + * mm-decode.el (mm-save-part): Put the entire path in the `M-n' slot. 2010-11-04 Katsumi Yamaoka diff --git a/lisp/nnimap.el b/lisp/nnimap.el index ef7831caa..65d5af964 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -731,8 +731,6 @@ textual parts.") ;; to examine a mailbox that doesn't exist. This seems to be ;; the only way that allows us to reliably go back to unselected ;; state on Courier. - (nnimap-command "EXAMINE DOES.NOT.EXIST") - (setf (nnimap-group nnimap-object) nil) (car (nnimap-command "RENAME %S %S" (utf7-encode group t) (utf7-encode new-name t)))))) @@ -863,8 +861,9 @@ textual parts.") (defun nnimap-find-article-by-message-id (group message-id) (with-current-buffer (nnimap-buffer) (erase-buffer) - (setf (nnimap-group nnimap-object) nil) - (nnimap-send-command "EXAMINE %S" (utf7-encode group t)) + (unless (equal group (nnimap-group nnimap-object)) + (setf (nnimap-group nnimap-object) nil) + (nnimap-send-command "EXAMINE %S" (utf7-encode group t))) (let ((sequence (nnimap-send-command "UID SEARCH HEADER Message-Id %S" message-id)) article result) -- 2.34.1