From: teranisi Date: Wed, 4 Oct 2000 04:09:44 +0000 (+0000) Subject: * elmo2.el (elmo-msgdb-search): Moved from elmo-msgdb.el. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=202b3422f782dde66f9011f19d00d8adca1e1c8c;p=elisp%2Fwanderlust.git * elmo2.el (elmo-msgdb-search): Moved from elmo-msgdb.el. * elmo-msgdb.el (elmo-msgdb-search): Moved to elmo2.el. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 0168bdf..30541cf 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,9 @@ +2000-10-04 Yuuichi Teranishi + + * elmo2.el (elmo-msgdb-search): Moved from elmo-msgdb.el. + + * elmo-msgdb.el (elmo-msgdb-search): Moved to elmo2.el. + 2000-10-03 Hiroya Murata * elmo-util.el (elmo-condition-parse-search-value): diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index 90e5c3b..f75c98f 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -467,30 +467,6 @@ header separator." (elmo-msgdb-search-internal-primitive (nth 2 condition) entity number-list))))) -(defun elmo-msgdb-search (folder condition msgdb) - "Search messages from MSGDB which satisfy CONDITION." - (let* ((condition (car (elmo-parse-search-condition condition))) - (overview (elmo-msgdb-get-overview msgdb)) - (number-alist (elmo-msgdb-get-number-alist msgdb)) - (number-list (mapcar 'car number-alist)) - (length (length overview)) - (i 0) - result) - (if (elmo-condition-find-key condition "body") - (elmo-search folder condition number-list) - (while overview - (if (elmo-msgdb-search-internal condition (car overview) - number-list) - (setq result - (cons - (elmo-msgdb-overview-entity-get-number (car overview)) - result))) - (setq i (1+ i)) - (elmo-display-progress - 'elmo-msgdb-search "Searching..." (/ (* i 100) length)) - (setq overview (cdr overview))) - (nreverse result)))) - (defun elmo-msgdb-delete-msgs (folder msgs msgdb &optional reserve-cache) "Delete MSGS from FOLDER in MSGDB. content of MSGDB is changed." diff --git a/elmo/elmo2.el b/elmo/elmo2.el index f27fa5f..0c66741 100644 --- a/elmo/elmo2.el +++ b/elmo/elmo2.el @@ -391,6 +391,30 @@ without cacheing." (elmo-call-func folder "search" condition from-msgs) (elmo-cache-search-all folder condition from-msgs))) +(defun elmo-msgdb-search (folder condition msgdb) + "Search messages which satisfy CONDITION from FOLDER with MSGDB." + (let* ((condition (car (elmo-parse-search-condition condition))) + (overview (elmo-msgdb-get-overview msgdb)) + (number-alist (elmo-msgdb-get-number-alist msgdb)) + (number-list (mapcar 'car number-alist)) + (length (length overview)) + (i 0) + result) + (if (elmo-condition-find-key condition "body") + (elmo-search folder condition number-list) + (while overview + (if (elmo-msgdb-search-internal condition (car overview) + number-list) + (setq result + (cons + (elmo-msgdb-overview-entity-get-number (car overview)) + result))) + (setq i (1+ i)) + (elmo-display-progress + 'elmo-msgdb-search "Searching..." (/ (* i 100) length)) + (setq overview (cdr overview))) + (nreverse result)))) + (defun elmo-msgdb-create (folder numlist new-mark already-mark seen-mark important-mark seen-list) (if (elmo-folder-plugged-p folder)