(luna-define-method elmo-folder-msgdb-create ((folder elmo-filter-folder)
numlist seen-list)
- (let* ((target-folder (elmo-filter-folder-target-internal folder))
- (len (length numlist))
- (msgdb (elmo-folder-msgdb target-folder))
- overview number-alist mark-alist message-id entity)
- (when (> len elmo-display-progress-threshold)
- (elmo-progress-set 'elmo-folder-msgdb-create
- len "Creating msgdb..."))
- (unwind-protect
- (dolist (number numlist)
- (setq entity (elmo-msgdb-overview-get-entity number msgdb))
- (when entity
- (setq overview (elmo-msgdb-append-element overview entity)
- message-id (elmo-msgdb-overview-entity-get-id entity)
- number-alist (elmo-msgdb-number-add number-alist
- number
- message-id)
- mark-alist (elmo-msgdb-mark-append
- mark-alist
- number
- (elmo-msgdb-get-mark msgdb number))))
- (elmo-progress-notify 'elmo-folder-msgdb-create))
- (elmo-progress-clear 'elmo-folder-msgdb-create))
- (list overview number-alist mark-alist)))
+ (if (elmo-filter-folder-require-msgdb-internal folder)
+ (let* ((target-folder (elmo-filter-folder-target-internal folder))
+ (len (length numlist))
+ (msgdb (elmo-folder-msgdb target-folder))
+ overview number-alist mark-alist message-id entity)
+ (when (> len elmo-display-progress-threshold)
+ (elmo-progress-set 'elmo-folder-msgdb-create
+ len "Creating msgdb..."))
+ (unwind-protect
+ (dolist (number numlist)
+ (setq entity (elmo-msgdb-overview-get-entity number msgdb))
+ (when entity
+ (setq overview (elmo-msgdb-append-element overview entity)
+ message-id (elmo-msgdb-overview-entity-get-id entity)
+ number-alist (elmo-msgdb-number-add number-alist
+ number
+ message-id)
+ mark-alist (elmo-msgdb-mark-append
+ mark-alist
+ number
+ (elmo-msgdb-get-mark msgdb number))))
+ (elmo-progress-notify 'elmo-folder-msgdb-create))
+ (elmo-progress-clear 'elmo-folder-msgdb-create))
+ (list overview number-alist mark-alist))
+ ;; Does not require msgdb.
+ (elmo-folder-msgdb-create
+ (elmo-filter-folder-target-internal folder)
+ numlist seen-list)))
(luna-define-method elmo-folder-append-buffer ((folder elmo-filter-folder)
unread &optional number)