* elmo2.el (elmo-msgdb-search): Moved from elmo-msgdb.el.
authorteranisi <teranisi>
Wed, 4 Oct 2000 04:09:44 +0000 (04:09 +0000)
committerteranisi <teranisi>
Wed, 4 Oct 2000 04:09:44 +0000 (04:09 +0000)
* elmo-msgdb.el (elmo-msgdb-search): Moved to elmo2.el.

elmo/ChangeLog
elmo/elmo-msgdb.el
elmo/elmo2.el

index 0168bdf..30541cf 100644 (file)
@@ -1,3 +1,9 @@
+2000-10-04  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * 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      <lapis-lazuli@pop06.odn.ne.jp>
 
        * elmo-util.el (elmo-condition-parse-search-value):
index 90e5c3b..f75c98f 100644 (file)
@@ -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."
index f27fa5f..0c66741 100644 (file)
@@ -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)