From 2bf56a9422a7caa7bf065b49513727f87344187a Mon Sep 17 00:00:00 2001 From: hmurata Date: Sun, 7 Sep 2003 02:37:29 +0000 Subject: [PATCH] * elmo-msgdb.el (elmo-msgdb-list-messages): Undo last change. (elmo-msgdb-flags): New function. (elmo-msgdb-merge): Use elmo-msgdb-append. * elmo-localdir.el (elmo-folder-pack-numbers): Fixed the last change. * elmo-map.el (elmo-folder-pack-numbers): Ditto. * elmo-dop.el (elmo-folder-status-dop): Use elmo-folder-list-messages instead of elmo-msgdb-list-messages. --- elmo/ChangeLog | 16 +++++++++++++++- elmo/elmo-dop.el | 3 +-- elmo/elmo-localdir.el | 1 + elmo/elmo-map.el | 2 +- elmo/elmo-msgdb.el | 34 +++++++--------------------------- 5 files changed, 25 insertions(+), 31 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index d869f8e..76429c9 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,8 +1,22 @@ +2003-09-07 Hiroya Murata + + * elmo-msgdb.el (elmo-msgdb-list-messages): Undo last change. + (elmo-msgdb-flags): New function. + (elmo-msgdb-merge): Use elmo-msgdb-append. + + * elmo-localdir.el (elmo-folder-pack-numbers): Fixed the last + change. + + * elmo-map.el (elmo-folder-pack-numbers): Ditto. + + * elmo-dop.el (elmo-folder-status-dop): Use + elmo-folder-list-messages instead of elmo-msgdb-list-messages. + 2003-09-06 Hiroya Murata * elmo-map.el (elmo-folder-pack-numbers): Rewrite. - * elmo-localdir.el (elmo-folder-pack-numbers): Fixed last chagne. + * elmo-localdir.el (elmo-folder-pack-numbers): Fixed last change. * elmo-msgdb.el (elmo-msgdb-append-entity): Fixed. diff --git a/elmo/elmo-dop.el b/elmo/elmo-dop.el index bbacd0a..6ce80f9 100644 --- a/elmo/elmo-dop.el +++ b/elmo/elmo-dop.el @@ -286,8 +286,7 @@ FOLDER is the folder structure." ;;; Execute as subsutitute for plugged operation. (defun elmo-folder-status-dop (folder) - (let ((number-list (elmo-msgdb-list-messages - (elmo-folder-msgdb-path folder))) + (let ((number-list (elmo-folder-list-messages folder nil 'in-msgdb)) (spool-folder (elmo-dop-spool-folder folder)) spool-length (i 0) diff --git a/elmo/elmo-localdir.el b/elmo/elmo-localdir.el index 5e8d96c..fae0eaf 100644 --- a/elmo/elmo-localdir.el +++ b/elmo/elmo-localdir.el @@ -342,6 +342,7 @@ (new-msgdb (elmo-make-msgdb)) (numbers (sort (elmo-folder-list-messages folder + nil (not elmo-pack-number-check-strict)) '<)) (new-number 1) ; first ordinal position in localdir diff --git a/elmo/elmo-map.el b/elmo/elmo-map.el index 4d422a6..36b3504 100644 --- a/elmo/elmo-map.el +++ b/elmo/elmo-map.el @@ -138,7 +138,7 @@ (luna-define-method elmo-folder-pack-numbers ((folder elmo-map-folder)) (let* ((msgdb (elmo-folder-msgdb folder)) - (numbers (sort (elmo-folder-list-messages folder 'in-db) '<)) + (numbers (sort (elmo-folder-list-messages folder nil 'in-msgdb) '<)) (new-msgdb (elmo-make-msgdb)) (number 1) total location entity) diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index 4ea7e10..8f91dc1 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -179,14 +179,10 @@ (elmo-msgdb-make-index msgdb) msgdb)) -(defun elmo-msgdb-list-messages (msgdb-or-path) - "Return a list of message numbers in the msgdb. -If MSGDB-OR-PATH is a msgdb structure, use it as a msgdb. -If argument is a string, use it as a path to load message entities." +(defun elmo-msgdb-list-messages (msgdb) + "Return a list of message numbers in the MSGDB." (mapcar 'elmo-msgdb-overview-entity-get-number - (if (stringp msgdb-or-path) - (elmo-msgdb-overview-load msgdb-or-path) - (elmo-msgdb-get-overview msgdb-or-path)))) + (elmo-msgdb-get-overview msgdb))) (defsubst elmo-msgdb-mark-to-flags (mark) (append @@ -287,6 +283,9 @@ If mark is changed, return non-nil." elmo-msgdb-unread-cached-mark elmo-msgdb-unread-uncached-mark))))))) +(defsubst elmo-msgdb-flags (msgdb number) + (elmo-msgdb-mark-to-flags (elmo-msgdb-get-mark msgdb number))) + (defun elmo-msgdb-set-flag (msgdb folder number flag) "Set message flag. MSGDB is the ELMO msgdb. @@ -476,26 +475,7 @@ FLAG is a symbol which is one of the following: (setq msgdb (or (elmo-folder-msgdb-internal folder) (elmo-make-msgdb nil nil nil (elmo-folder-msgdb-path folder)))) - (elmo-msgdb-set-overview - msgdb - (nconc (elmo-msgdb-get-overview msgdb) - (elmo-msgdb-get-overview msgdb-merge))) - (elmo-msgdb-set-number-alist - msgdb - (nconc (elmo-msgdb-get-number-alist msgdb) - (elmo-msgdb-get-number-alist msgdb-merge))) - (elmo-msgdb-set-mark-alist - msgdb - (nconc (elmo-msgdb-get-mark-alist msgdb) - (elmo-msgdb-get-mark-alist msgdb-merge))) - (setq duplicates (elmo-msgdb-make-index - msgdb - (elmo-msgdb-get-overview msgdb-merge) - (elmo-msgdb-get-mark-alist msgdb-merge))) - (elmo-msgdb-set-path - msgdb - (or (elmo-msgdb-get-path msgdb) - (elmo-msgdb-get-path msgdb-merge))) + (setq duplicates (elmo-msgdb-append msgdb msgdb-merge)) (elmo-folder-set-msgdb-internal folder msgdb) duplicates)) -- 1.7.10.4