From f74674512708bc500503809e13fa15bbb9b2c798 Mon Sep 17 00:00:00 2001 From: kaoru Date: Sun, 15 Jun 2003 15:50:38 +0000 Subject: [PATCH] * elmo-nntp.el (elmo-folder-search): Body search is to search from cache even if the folder is plugged. (elmo-nntp-search-primitive): Do nothing when body search is invoked (although it is not used by the change above). (elmo-nntp-get-folders-info): Don't use replace-regexp. --- elmo/ChangeLog | 6 ++++++ elmo/elmo-nntp.el | 16 ++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 2f078d9..902bcf3 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,11 @@ 2003-06-15 TAKAHASHI Kaoru + * elmo-nntp.el (elmo-folder-search): Body search is to search from + cache even if the folder is plugged. + (elmo-nntp-search-primitive): Do nothing when body search is + invoked (although it is not used by the change above). + (elmo-nntp-get-folders-info): Don't use replace-regexp. + * elmo-multi.el (elmo-folder-search): Don't ignore error anymore. * elmo-localdir.el (elmo-folder-pack-numbers): onum, a member of diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index 7f4e265..980db9c 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -1164,8 +1164,7 @@ Returns a list of cons cells like (NUMBER . VALUE)" (elmo-list-filter from-msgs result) result))) ((string= "body" search-key) - (error -"Search by BODY is not supported (Toggle the plug off to search from caches)")) + nil) (t (let ((val (elmo-filter-value condition)) (negative (eq (elmo-filter-type condition) 'unmatch)) @@ -1214,7 +1213,8 @@ Returns a list of cons cells like (NUMBER . VALUE)" (luna-define-method elmo-folder-search :around ((folder elmo-nntp-folder) condition &optional from-msgs) - (if (elmo-folder-plugged-p folder) + (if (and (elmo-folder-plugged-p folder) + (not (string= "body" (elmo-filter-key condition)))) (elmo-nntp-search-internal folder condition from-msgs) (luna-call-next-method))) @@ -1272,11 +1272,11 @@ Returns a list of cons cells like (NUMBER . VALUE)" (postfix (elmo-nntp-folder-postfix user server port type))) (if (not (string= postfix "")) (save-excursion - (replace-regexp "^\\(211 [0-9]+ [0-9]+ [0-9]+ [^ \n]+\\).*$" - (concat "\\1" - (elmo-replace-in-string - postfix - "\\\\" "\\\\\\\\\\\\\\\\")))))) + (while (re-search-forward "^\\(211 [0-9]+ [0-9]+ [0-9]+ [^ \n]+\\)\\(.*\\)$" nil t) + (replace-match (concat (match-string 1) + (elmo-replace-in-string + postfix + "\\\\" "\\\\\\\\\\\\\\\\"))))))) (let (len min max group) (while (not (eobp)) (condition-case () -- 1.7.10.4