From 6446255a2d64119354f05e00905df8a9e1995f05 Mon Sep 17 00:00:00 2001 From: teranisi Date: Thu, 21 Nov 2002 12:08:15 +0000 Subject: [PATCH] * 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. --- elmo/ChangeLog | 9 +++++++++ elmo/elmo-imap4.el | 13 ++++++++++++- elmo/elmo-multi.el | 5 +++-- elmo/elmo-nntp.el | 3 ++- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 3862ee0..b48a16c 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,12 @@ +2002-11-21 Yuuichi Teranishi + + * 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 * elmo-nntp.el (elmo-nntp-search-primitive): Fix the last change, diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 6d05863..a92b13f 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -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))))) @@ -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)) diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index bf636c0..a4d0da5 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -540,8 +540,9 @@ (+ (* (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))) diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index 405b605..74030a8 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -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)) -- 1.7.10.4