(defun elmo-imap4-list-folders (spec &optional hierarchy)
(save-excursion
- (let* ((root (elmo-imap4-spec-folder spec))
+ (let* ((root (elmo-imap4-spec-mailbox spec))
(process (elmo-imap4-get-process spec))
(delim (or
(cdr
(elmo-imap4-send-command (process-buffer process)
process
(format "status \"%s\" (messages)"
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(elmo-imap4-read-response (process-buffer process) process)))
(defun elmo-imap4-folder-creatable-p (spec)
(defun elmo-imap4-create-folder (spec)
(let ((process (elmo-imap4-get-process spec))
- (folder (elmo-imap4-spec-folder spec)))
+ (folder (elmo-imap4-spec-mailbox spec)))
(when folder
;; For UW imapd 4.6, this workaround is needed to create #mh mailbox.
; (if (string-match "^\\(#mh/\\).*[^/]$" folder)
(defun elmo-imap4-delete-folder (spec)
(let ((process (elmo-imap4-get-process spec))
msgs)
- (when (elmo-imap4-spec-folder spec)
+ (when (elmo-imap4-spec-mailbox spec)
(when (setq msgs (elmo-imap4-list-folder spec))
(elmo-imap4-delete-msgs spec msgs))
(elmo-imap4-send-command (process-buffer process) process "close")
(elmo-imap4-send-command (process-buffer process)
process
(format "delete %s"
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(if (null (elmo-imap4-read-response (process-buffer process)
process))
- (error "Delete folder %s failed" (elmo-imap4-spec-folder spec))
+ (error "Delete folder %s failed" (elmo-imap4-spec-mailbox spec))
t))))
(defun elmo-imap4-rename-folder (old-spec new-spec)
(let ((process (elmo-imap4-get-process old-spec)))
- (when (elmo-imap4-spec-folder old-spec)
+ (when (elmo-imap4-spec-mailbox old-spec)
(elmo-imap4-send-command (process-buffer process) process "close")
(elmo-imap4-read-response (process-buffer process) process)
(elmo-imap4-send-command (process-buffer process)
process
(format "rename %s %s"
- (elmo-imap4-spec-folder old-spec)
- (elmo-imap4-spec-folder new-spec)))
+ (elmo-imap4-spec-mailbox old-spec)
+ (elmo-imap4-spec-mailbox new-spec)))
(if (null (elmo-imap4-read-response (process-buffer process) process))
(error "Rename folder from %s to %s failed"
- (elmo-imap4-spec-folder old-spec)
- (elmo-imap4-spec-folder new-spec))
+ (elmo-imap4-spec-mailbox old-spec)
+ (elmo-imap4-spec-mailbox new-spec))
t))))
(defun elmo-imap4-max-of-folder (spec)
(elmo-imap4-send-command (process-buffer process)
process
(format "status \"%s\" (uidnext messages)"
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(setq response (elmo-imap4-read-response (process-buffer process)
process))
(when (and response (string-match
(save-excursion
(let ((connection (elmo-imap4-get-connection spec))
response ret-val beg end)
- (and (not (null (elmo-imap4-spec-folder spec)))
+ (and (not (null (elmo-imap4-spec-mailbox spec)))
(if (not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(if (null (setq response
(elmo-imap4-select-folder
- (elmo-imap4-spec-folder spec)
+ (elmo-imap4-spec-mailbox spec)
connection)))
(error "Select folder failed"))
(if elmo-imap4-use-select-to-update-status
(elmo-imap4-select-folder
- (elmo-imap4-spec-folder spec)
+ (elmo-imap4-spec-mailbox spec)
connection)
(elmo-imap4-check connection)))))))
(elmo-imap4-send-command (process-buffer process)
process
(format "status \"%s\" (uidvalidity)"
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(setq response (elmo-imap4-read-response
(process-buffer process) process))
(if (string-match "UIDVALIDITY \\([0-9]+\\)" response)
(elmo-imap4-send-command (process-buffer process)
process
(format "status \"%s\" (uidvalidity)"
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(setq response (elmo-imap4-read-response
(process-buffer process) process))
(if (string-match "UIDVALIDITY \\([0-9]+\\)" response)
(let* ((connection (elmo-imap4-get-connection spec))
(process (elmo-imap4-connection-get-process connection))
response ret-val beg end)
- (and (elmo-imap4-spec-folder spec)
+ (and (elmo-imap4-spec-mailbox spec)
(if (not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(if (null (setq response
(elmo-imap4-select-folder
- (elmo-imap4-spec-folder spec)
+ (elmo-imap4-spec-mailbox spec)
connection)))
(error "Select folder failed"))
;; for status update.
(if elmo-imap4-use-select-to-update-status
- (elmo-imap4-select-folder (elmo-imap4-spec-folder spec)
+ (elmo-imap4-select-folder (elmo-imap4-spec-mailbox spec)
connection)
(unless (elmo-imap4-check connection)
;; Check failed...not selected??
- (elmo-imap4-select-folder (elmo-imap4-spec-folder spec)
+ (elmo-imap4-select-folder (elmo-imap4-spec-mailbox spec)
connection)))))
(elmo-imap4-send-command (process-buffer process)
process
(let* ((connection (elmo-imap4-get-connection spec))
(process (elmo-imap4-connection-get-process connection))
response ret-val len word)
- (if (and (elmo-imap4-spec-folder spec)
+ (if (and (elmo-imap4-spec-mailbox spec)
(not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(null (elmo-imap4-select-folder
- (elmo-imap4-spec-folder spec) connection)))
+ (elmo-imap4-spec-mailbox spec) connection)))
(error "Select folder failed"))
(while condition
(setq response (elmo-imap4-search-internal process
(defun elmo-imap4-use-flag-p (spec)
(not (string-match elmo-imap4-disuse-server-flag-mailbox-regexp
- (elmo-imap4-spec-folder spec))))
+ (elmo-imap4-spec-mailbox spec))))
(defsubst elmo-imap4-make-address (name mbox host)
(cond (name
(process (elmo-imap4-connection-get-process connection))
(msg-list (copy-sequence msgs))
set-list ent)
- (if (and (elmo-imap4-spec-folder spec)
+ (if (and (elmo-imap4-spec-mailbox spec)
(not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(null (elmo-imap4-select-folder
- (elmo-imap4-spec-folder spec) connection)))
+ (elmo-imap4-spec-mailbox spec) connection)))
(error "Select folder failed"))
(setq set-list (elmo-imap4-make-number-set-list msg-list))
(when set-list
numlist
elmo-imap4-overview-fetch-chop-length))
(message "Getting overview...")
- (if (and (elmo-imap4-spec-folder spec)
+ (if (and (elmo-imap4-spec-mailbox spec)
(not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(null (elmo-imap4-select-folder
- (elmo-imap4-spec-folder spec) connection)))
+ (elmo-imap4-spec-mailbox spec) connection)))
(error "Select imap folder %s failed"
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(while set-list
(elmo-imap4-send-command
(process-buffer process)
ret-val
(elmo-imap4-create-msgdb-from-overview-string
ov-str
- (elmo-imap4-spec-folder spec)
+ (elmo-imap4-spec-mailbox spec)
new-mark already-mark seen-mark important-mark
seen-list filter)))))
(setq count (+ count (car (car set-list))))
ret-val
(elmo-imap4-create-msgdb-from-overview-string
ov-str
- (elmo-imap4-spec-folder spec)
+ (elmo-imap4-spec-mailbox spec)
new-mark already-mark seen-mark important-mark
seen-list filter)))))
(message "Getting overview...done.")
(connection (elmo-imap4-get-connection spec))
(process (elmo-imap4-connection-get-process connection))
response ret-val bytes)
- (when (elmo-imap4-spec-folder spec)
+ (when (elmo-imap4-spec-mailbox spec)
(when (not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(if (null (setq response
(elmo-imap4-select-folder
- (elmo-imap4-spec-folder spec) connection)))
+ (elmo-imap4-spec-mailbox spec) connection)))
(error "Select folder failed")))
(elmo-imap4-send-command (process-buffer process)
process
(process (elmo-imap4-connection-get-process connection))
response ret-val bytes)
(as-binary-process
- (when (elmo-imap4-spec-folder spec)
+ (when (elmo-imap4-spec-mailbox spec)
(when (not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(if (null (setq response
(elmo-imap4-select-folder
- (elmo-imap4-spec-folder spec)
+ (elmo-imap4-spec-mailbox spec)
connection)))
(error "Select folder failed")))
(elmo-imap4-send-command (process-buffer process)
(process (elmo-imap4-connection-get-process connection))
;;(size (length string))
response msgs)
- (if (and (elmo-imap4-spec-folder spec)
+ (if (and (elmo-imap4-spec-mailbox spec)
(not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(null (elmo-imap4-select-folder
- (elmo-imap4-spec-folder spec)
+ (elmo-imap4-spec-mailbox spec)
connection)))
(error "Select folder failed"))
(save-excursion
(let* ((connection (elmo-imap4-get-connection spec))
(process (elmo-imap4-connection-get-process connection))
send-buf)
- (if (and (elmo-imap4-spec-folder spec)
+ (if (and (elmo-imap4-spec-mailbox spec)
(not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(null (elmo-imap4-select-folder
- (elmo-imap4-spec-folder spec) connection)))
+ (elmo-imap4-spec-mailbox spec) connection)))
(error "Select folder failed"))
(save-excursion
(setq send-buf (elmo-imap4-setup-send-buffer-from-file
(elmo-imap4-send-command (process-buffer process)
process
(format "append %s (\\Seen) {%d}"
- (elmo-imap4-spec-folder spec)
+ (elmo-imap4-spec-mailbox spec)
(buffer-size)))
(process-send-string process (buffer-string))
(process-send-string process "\r\n") ; finished appending.
(let* ((connection (elmo-imap4-get-connection spec))
(process (elmo-imap4-connection-get-process connection))
send-buf)
- (if (and (elmo-imap4-spec-folder spec)
+ (if (and (elmo-imap4-spec-mailbox spec)
(not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec)))
- (null (elmo-imap4-select-folder (elmo-imap4-spec-folder spec)
+ (elmo-imap4-spec-mailbox spec)))
+ (null (elmo-imap4-select-folder (elmo-imap4-spec-mailbox spec)
connection)))
(error "Select folder failed"))
(save-excursion
(elmo-imap4-send-command (process-buffer process)
process
(format "append %s %s{%d}"
- (elmo-imap4-spec-folder spec)
+ (elmo-imap4-spec-mailbox spec)
(if no-see "" "(\\Seen) ")
(buffer-size)))
(if (null (elmo-imap4-read-response (process-buffer process)
(defun elmo-imap4-copy-msgs (dst-spec msgs src-spec &optional expunge-it same-number)
"Equivalence of hostname, username is assumed."
(save-excursion
- (let* ((src-folder (elmo-imap4-spec-folder src-spec))
- (dst-folder (elmo-imap4-spec-folder dst-spec))
+ (let* ((src-folder (elmo-imap4-spec-mailbox src-spec))
+ (dst-folder (elmo-imap4-spec-mailbox dst-spec))
(connection (elmo-imap4-get-connection src-spec))
(process (elmo-imap4-connection-get-process connection))
(mlist msgs))
response)
;; commit when same folder.
(if (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-folder spec))
+ (elmo-imap4-spec-mailbox spec))
(elmo-imap4-commit spec))
(elmo-imap4-send-command (process-buffer process)
process
(format
"status \"%s\" (unseen messages)"
- (elmo-imap4-spec-folder spec)))
+ (elmo-imap4-spec-mailbox spec)))
(setq response (elmo-imap4-read-response
(process-buffer process) process))
(when (string-match "\\* STATUS [^(]* \\(([^)]*)\\)" response)