(imap-mailbox-examine-1): New function.
authorSimon Josefsson <jas@extundo.com>
Mon, 19 Jun 2000 16:33:35 +0000 (16:33 +0000)
committerSimon Josefsson <jas@extundo.com>
Mon, 19 Jun 2000 16:33:35 +0000 (16:33 +0000)
(imap-message-copyuid-1):
(imap-message-appenduid-1): Use it, instead of `imap-mailbox-examine'
which would utf-7 encode mailbox name twice.

lisp/ChangeLog
lisp/imap.el

index a4b72d4..7e55684 100644 (file)
@@ -1,3 +1,11 @@
+2000-06-20  Simon Josefsson  <jas@pdc.kth.se>
+
+       * imap.el (imap-mailbox-examine-1): New function.
+       (imap-message-copyuid-1):
+       (imap-message-appenduid-1): Use it, instead of
+       `imap-mailbox-examine' which would utf-7 encode mailbox name
+       twice.
+
 2000-06-19  Dave Love  <fx@gnu.org>
 
        * mm-uu.el Don't require message.  Require cl when compiling.
index 0b01b42..7aff9c5 100644 (file)
@@ -950,6 +950,10 @@ If EXAMINE is non-nil, do a read-only select."
     (imap-utf7-decode 
      (imap-mailbox-select-1 (imap-utf7-encode mailbox) examine))))
 
+(defun imap-mailbox-examine-1 (mailbox &optional buffer)
+  (with-current-buffer (or buffer (current-buffer))
+    (imap-mailbox-select-1 mailbox 'exmine)))
+
 (defun imap-mailbox-examine (mailbox &optional buffer)
   "Examine MAILBOX on server in BUFFER."
   (imap-mailbox-select mailbox 'exmine buffer))
@@ -1288,7 +1292,7 @@ is non-nil return theese properties."
     (let ((old-mailbox imap-current-mailbox)
          (state imap-state)
          (imap-message-data (make-vector 2 0)))
-      (when (imap-mailbox-examine mailbox)
+      (when (imap-mailbox-examine-1 mailbox)
        (prog1
            (and (imap-fetch "*" "UID")
                 (list (imap-mailbox-get-1 'uidvalidity mailbox)
@@ -1329,7 +1333,7 @@ first element, rest of list contain the saved articles' UIDs."
     (let ((old-mailbox imap-current-mailbox)
          (state imap-state)
          (imap-message-data (make-vector 2 0)))
-      (when (imap-mailbox-examine mailbox)
+      (when (imap-mailbox-examine-1 mailbox)
        (prog1
            (and (imap-fetch "*" "UID")
                 (list (imap-mailbox-get-1 'uidvalidity mailbox)
@@ -2372,6 +2376,7 @@ Return nil if no complete line has arrived."
            imap-current-mailbox-p
            imap-mailbox-select-1
            imap-mailbox-select
+           imap-mailbox-examine-1
            imap-mailbox-examine
            imap-mailbox-unselect
            imap-mailbox-expunge