* elmo-nntp.el (elmo-nntp-search-primitive): Revert the last change.
authorteranisi <teranisi>
Thu, 21 Nov 2002 12:06:40 +0000 (12:06 +0000)
committerteranisi <teranisi>
Thu, 21 Nov 2002 12:06:40 +0000 (12:06 +0000)
* elmo-multi.el (elmo-folder-search): Ignore errors while search.

* elmo-imap4.el (elmo-imap4-response-garbage-p): New macro.
(elmo-imap4-read-response): Take care of garbage response.

elmo/ChangeLog
elmo/elmo-imap4.el
elmo/elmo-multi.el
elmo/elmo-nntp.el

index 2ebe7b5..ac74ed7 100644 (file)
@@ -1,3 +1,12 @@
+2002-11-21  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-nntp.el (elmo-nntp-search-primitive): Revert the last change.
+
+       * elmo-multi.el (elmo-folder-search): Ignore errors while search.
+
+       * elmo-imap4.el (elmo-imap4-response-garbage-p): New macro.
+       (elmo-imap4-read-response): Take care of garbage response.
+
 2002-11-20  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
 
        * elmo-nntp.el (elmo-nntp-search-primitive): Fix the last change,
index f189e0b..f56aab8 100644 (file)
@@ -227,6 +227,10 @@ Debug information is inserted in the buffer \"*IMAP4 DEBUG*\"")
   "Returns non-nil if RESPONSE is an 'BYE' response."
   (` (assq 'bye (, response))))
 
+(defmacro elmo-imap4-response-garbage-p (response)
+  "Returns non-nil if RESPONSE is an 'garbage' response."
+  (` (assq 'garbage (, response))))
+
 (defmacro elmo-imap4-response-value (response symbol)
   "Get value of the SYMBOL from RESPONSE."
   (` (nth 1 (assq (, symbol) (, response)))))
@@ -241,7 +245,7 @@ Debug information is inserted in the buffer \"*IMAP4 DEBUG*\"")
     matched))
 
 (defmacro elmo-imap4-response-error-text (response)
-  "Returns text of NO, BAD, BYE response."
+  "Returns text of NO, BAD, BYE, response."
   (` (nth 1 (or (elmo-imap4-response-value (, response) 'no)
                (elmo-imap4-response-value (, response) 'bad)
                (elmo-imap4-response-value (, response) 'bye)))))
@@ -347,7 +351,14 @@ TAG is the tag of the command"
   (with-current-buffer (process-buffer
                        (elmo-network-session-process-internal session))
     (while (not (or (string= tag elmo-imap4-reached-tag)
-                   (elmo-imap4-response-bye-p elmo-imap4-current-response)))
+                   (elmo-imap4-response-bye-p elmo-imap4-current-response)
+                   (when (elmo-imap4-response-garbage-p
+                          elmo-imap4-current-response)
+                     (message "Garbage response: %s" 
+                              (elmo-imap4-response-value
+                               elmo-imap4-current-response
+                               'garbage))
+                     t)))
       (when (memq (process-status
                   (elmo-network-session-process-internal session))
                  '(open run))
index bf636c0..a4d0da5 100644 (file)
                          (+
                           (* (elmo-multi-folder-divide-number-internal
                               folder) cur-number) x)))
-                      (elmo-folder-search
-                       (car flds) condition)))))
+                      (ignore-errors
+                        (elmo-folder-search
+                         (car flds) condition))))))
       (when numlist
        (setq numlist-list (cdr numlist-list)))
       (setq flds (cdr flds)))
index 405b605..74030a8 100644 (file)
@@ -1164,7 +1164,8 @@ Returns a list of cons cells like (NUMBER . VALUE)"
            (elmo-list-filter from-msgs result)
          result)))
      ((string= "body" search-key)
-      nil)
+      (error
+"Search by BODY is not supported (Toggle the plug off to search from caches)"))
      (t
       (let ((val (elmo-filter-value condition))
            (negative (eq (elmo-filter-type condition) 'unmatch))