+2003-08-13 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo.el (elmo-folder-detach-messages): Don't load msgdb if empty.
+
+ * elmo-pipe.el (elmo-pipe-drain): Bind elmo-inhibit-number-mapping
+ only when src folder type is pop3.
+
2003-08-12 Yuuichi Teranishi <teranisi@gohome.org>
* elmo-msgdb.el (elmo-msgdb-make-index): Use
(defun elmo-pipe-drain (src dst &optional copy ignore-list)
"Move or copy all messages of SRC to DST."
- (let ((elmo-inhibit-number-mapping (not copy)) ; No need to use UIDL
+ (let ((elmo-inhibit-number-mapping (and (eq (elmo-folder-type-internal
+ src) 'pop3)
+ (not copy))) ; No need to use UIDL
msgs len)
(message "Checking %s..." (elmo-folder-name-internal src))
;; Warnnig: some function requires msgdb
(error "Deleting message failed")))
(error "Deleting message failed")))))
-(luna-define-method elmo-folder-delete-messages-plugged
- ((folder elmo-pop3-folder) msgs)
+(luna-define-method elmo-folder-delete-messages-plugged ((folder
+ elmo-pop3-folder)
+ msgs)
(let ((loc-alist (elmo-pop3-folder-location-alist-internal folder))
(process (elmo-network-session-process-internal
(elmo-pop3-get-session folder))))
- (mapcar '(lambda (msg) (elmo-pop3-delete-msg
- process msg loc-alist))
+ (mapcar '(lambda (msg) (elmo-pop3-delete-msg process msg loc-alist))
msgs)))
(luna-define-method elmo-message-use-cache-p ((folder elmo-pop3-folder) number)
(luna-define-method elmo-folder-detach-messages ((folder elmo-folder)
numbers)
- (elmo-msgdb-delete-msgs (elmo-folder-msgdb folder) numbers))
+ (if (elmo-folder-msgdb-internal folder)
+ (elmo-msgdb-delete-msgs (elmo-folder-msgdb folder) numbers)))
(luna-define-generic elmo-folder-length (folder)
"Return number of messages in the FOLDER.")
(error "Cannot rename %s folder"
(symbol-name (elmo-folder-type-internal folder))))
-
;;; Define folders.
(elmo-define-folder ?% 'imap4)
(elmo-define-folder ?- 'nntp)