Function: imap-mailbox-rename

imap-mailbox-rename is a byte-compiled function defined in imap.el.gz.

Signature

(imap-mailbox-rename OLDNAME NEWNAME &optional BUFFER)

Documentation

Rename mailbox OLDNAME to NEWNAME on server in BUFFER.

If BUFFER is nil the current buffer is assumed.

Source Code

;; Defined in /usr/src/emacs/lisp/net/imap.el.gz
(defun imap-mailbox-rename (oldname newname &optional buffer)
  "Rename mailbox OLDNAME to NEWNAME on server in BUFFER.
If BUFFER is nil the current buffer is assumed."
  (let ((oldname (imap-utf7-encode oldname))
	(newname (imap-utf7-encode newname)))
    (with-current-buffer (or buffer (current-buffer))
      (imap-ok-p
       (imap-send-command-wait (list "RENAME \"" oldname "\" "
				     "\"" newname "\""))))))