* lisp/gnus/gnus-search.el (gnus-search-query-expand-key): Use the
proper built-in functions, rather than trying to replicate string
completion ourself.
Provide completion of search keys when reading the query
* lisp/gnus/gnus-search.el (gnus-search-minibuffer-map): Keymap for
use in reading the query.
(gnus-search-complete-key): Completion function bound to TAB.
(gnus-search-make-specs): Use `read-from-minibuffer', with our new
keymap.
* lisp/gnus/gnus-search.el (gnus-search-transform-expression): There's
no need to parenthesize those expressions. Nested parentheses
actually raise a parsing error, which is another bug.
* lisp/gnus/gnus-search.el (gnus-search-thread): Make this function
produce an engine-agnostic search query.
(gnus-search-prepare-query): Fix dumb error.
(gnus-search-indexed-search-command): Edit to handle the 'thread
key.
(gnus-search-run-search): In thread searches, have the imap
implementation expand Message-Id searches to include the References
header. Also, somewhere along the way we lost the
`gnus-search-get-active' call.
(gnus-search-run-search): For Notmuch, add an :around method on this
function, which does a primary search for thread-ids, then passes
off to the secondary search for the messages themselves.
(gnus-search-transform-expression): Forgot
that multiple nested ORs have to be parenthesized for IMAP.
* lisp/gnus/nnselect.el (nnselect-request-thread): Alter function to
pass in a generic thread search query; no longer calls imap-specific
code.
* lisp/gnus/gnus-search.el (gnus-search-single-p): Convenience
function for checking if a search is meant to return a single
message: ie, the query is only (id . "<msg-id>").
(gnus-search-run-search): Use in the imap method.
(gnus-search-indexed-parse-output): Use in the indexed method.
* lisp/gnus/gnus-search.el (gnus-search-run-search): In case of error,
this would have returned the actual process buffer for the notmuch
process: it should return nil.