(elmo-strict-folder-diff): Ditto.
(elmo-folder-set-info-max-by-numdb): Simplify.
* elmo-nntp.el (elmo-nntp-folder-msgdb-create): Use
elmo-msgdb-list-messages.
* elmo-msgdb.el (elmo-msgdb-seen-save): Abolish.
(elmo-msgdb-list-flagged): Fixed problem when `flag' is `read'.
+2003-08-02 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo.el (elmo-msgdb-load): Use elmo-msgdb-list-messages.
+ (elmo-strict-folder-diff): Ditto.
+ (elmo-folder-set-info-max-by-numdb): Simplify.
+
+ * elmo-nntp.el (elmo-nntp-folder-msgdb-create): Use
+ elmo-msgdb-list-messages.
+
+ * elmo-msgdb.el (elmo-msgdb-seen-save): Abolish.
+ (elmo-msgdb-list-flagged): Fixed problem when `flag' is `read'.
+
2003-08-02 Yuuichi Teranishi <teranisi@gohome.org>
* elmo.el (elmo-folder-list-messages): Treat killed-list only when
;; LIST-OF-MARKS elmo-msgdb-unread-marks
;; LIST-OF-MARKS elmo-msgdb-answered-marks
;; LIST-OF-MARKS elmo-msgdb-uncached-marks
-;; elmo-msgdb-seen-save DIR OBJ
;; elmo-msgdb-overview-save DIR OBJ
;; elmo-msgdb-message-entity MSGDB KEY
elmo-msgdb-answered-cached-mark
elmo-msgdb-answered-uncached-mark)))))
-(defsubst elmo-msgdb-seen-save (dir obj)
- (elmo-object-save
- (expand-file-name elmo-msgdb-seen-filename dir)
- obj))
-
(defsubst elmo-msgdb-overview-save (dir overview)
(elmo-object-save
(expand-file-name elmo-msgdb-overview-filename dir)
(list elmo-msgdb-important-mark))))))
(when mark-regexp
(if (eq flag 'read)
- (dolist (number (elmo-msgdb-get-number-alist msgdb))
- (unless (string-match mark-regexp (elmo-msgdb-get-mark
- msgdb number))
- (setq matched (cons number matched))))
+ (dolist (number (elmo-msgdb-list-messages msgdb))
+ (let ((mark (elmo-msgdb-get-mark msgdb number)))
+ (unless (and mark (string-match mark-regexp mark))
+ (setq matched (cons number matched)))))
(dolist (elem (elmo-msgdb-get-mark-alist msgdb))
(if (string-match mark-regexp (cadr elem))
(setq matched (cons (car elem) matched))))))
(elmo-delete-if
(lambda (number) (memq number deleting))
;; current number-list.
- (mapcar
- 'car
- (elmo-msgdb-get-number-alist (elmo-folder-msgdb folder))))
+ (elmo-msgdb-list-messages (elmo-folder-msgdb folder)))
;; append appending messages
(mapcar (lambda (x) (* -1 x))
(elmo-dop-spool-folder-list-messages folder))))
(elmo-folder-killed-list-internal folder)
(car (elmo-list-diff
numbers
- (mapcar 'car
- (elmo-msgdb-get-number-alist
- ret-val))))))
+ (elmo-msgdb-list-messages ret-val)))))
;; If there are canceled messages, overviews are not obtained
;; to max-number(inn 2.3?).
(when (and (elmo-nntp-max-number-precedes-list-active-p)
(defun elmo-folder-set-info-max-by-numdb (folder numbers)
"Set FOLDER info by MSGDB-NUMBER in msgdb."
- (let ((numbers (sort numbers '<)))
- (elmo-folder-set-info-hashtb
- folder
- (or (nth (max 0 (1- (length numbers))) numbers) 0)
- nil ;;(length num-db)
- )))
+ (elmo-folder-set-info-hashtb
+ folder
+ (or (car (sort numbers '>)) 0)
+ nil ;;(length num-db)
+ ))
(defun elmo-folder-get-info-max (folder)
"Return max number of FODLER from folder info."
(defsubst elmo-strict-folder-diff (folder)
"Return folder diff information strictly from FOLDER."
- (let* ((dir (elmo-folder-msgdb-path folder))
- (nalist (elmo-msgdb-get-number-alist (elmo-folder-msgdb folder)))
- (in-db (sort (mapcar 'car nalist) '<))
- (in-folder (elmo-folder-list-messages folder))
- append-list delete-list diff)
+ (let ((in-db (sort (elmo-msgdb-list-messages (elmo-folder-msgdb folder))
+ '<))
+ (in-folder (elmo-folder-list-messages folder))
+ append-list delete-list diff)
(cons (if (equal in-folder in-db)
0
(setq diff (elmo-list-diff in-folder in-db nil))
(let ((msgdb (elmo-load-msgdb (elmo-folder-msgdb-path folder))))
(elmo-folder-set-info-max-by-numdb
folder
- (mapcar 'elmo-msgdb-overview-entity-get-number
- (elmo-msgdb-get-overview msgdb)))
+ (elmo-msgdb-list-messages msgdb))
(unless silent
(message "Loading msgdb for %s...done"
(elmo-folder-name-internal folder)))