+2011-02-22 Andrew Cohen <cohen@andy.bu.edu>
+
+ * nnir.el (nnir-imap-search-arguments,nnir-imap-default-search-key):
+ Lower case names of search constraints.
+ (nnir-run-query): Cache and reuse search constraints for all imap
+ servers.
+
2011-02-22 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-msg.el (gnus-inews-add-send-actions): Restore the winconf name
;; Imap variables
(defvar nnir-imap-search-arguments
- '(("Whole message" . "TEXT")
- ("Subject" . "SUBJECT")
- ("To" . "TO")
- ("From" . "FROM")
- ("Imap" . ""))
+ '(("whole message" . "TEXT")
+ ("subject" . "SUBJECT")
+ ("to" . "TO")
+ ("from" . "FROM")
+ ("body" . "BODY")
+ ("imap" . ""))
"Mapping from user readable keys to IMAP search items for use in nnir")
(defvar nnir-imap-search-other "HEADER %S"
:type '(function)
:group 'nnir)
-(defcustom nnir-imap-default-search-key "Whole message"
+(defcustom nnir-imap-default-search-key "whole message"
"*The default IMAP search key for an nnir search. Must be one of
the keys in `nnir-imap-search-arguments'. To use raw imap queries
by default set this to \"Imap\"."
(setq search-func (cadr (assoc nnir-search-engine
nnir-engines)))
(if search-func
- (funcall search-func
- (if nnir-extra-parms
- (nnir-read-parms q nnir-search-engine)
- q)
- server (cadr x))
+ (funcall
+ search-func
+ (if nnir-extra-parms
+ (or (and (eq nnir-search-engine 'imap)
+ (assq 'criteria q) q)
+ (setq q (nnir-read-parms q nnir-search-engine)))
+ q)
+ server (cadr x))
nil)))
groups))))