2003-06-15 TAKAHASHI Kaoru <kaoru@kaisei.org>
+ * 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
(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))
(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)))
(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 ()