From 01ba87999d5de8354eb225bfb012d452309a593e Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 21 Nov 2010 06:07:59 +0100 Subject: [PATCH] Unselect group before renaming. This had gotten lost somewhere. --- lisp/ChangeLog | 6 ++++++ lisp/nnimap.el | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9aba1f990..115fdbdc2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-11-21 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-unselect-group): Made into its own function. + (nnimap-request-rename-group): Unselect group before renaming. This + had gotten lost somewhere. + 2010-11-20 Katsumi Yamaoka * gnus-gravatar.el (gnus-gravatar-transform-address): Decode name again. diff --git a/lisp/nnimap.el b/lisp/nnimap.el index ed69c4cda..0dd12afa5 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -727,13 +727,17 @@ textual parts.") (deffoo nnimap-request-rename-group (group new-name &optional server) (when (nnimap-possibly-change-group nil server) (with-current-buffer (nnimap-buffer) - ;; Make sure we don't have this group open read/write by asking - ;; 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-unselect-group) (car (nnimap-command "RENAME %S %S" (utf7-encode group t) (utf7-encode new-name t)))))) +(defun nnimap-unselect-group () + ;; Make sure we don't have this group open read/write by asking + ;; 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")) + (deffoo nnimap-request-expunge-group (group &optional server) (when (nnimap-possibly-change-group group server) (with-current-buffer (nnimap-buffer) -- 2.34.1