Commit graph

11 commits

Author SHA1 Message Date
Eric Abrahamsen
3e07b871c4 Remove unused "internal" gnus-search variables
* lisp/gnus/gnus-search.el (gnus-search-memo-query,
gnus-search-memo-server): No longer needed.
2020-11-11 10:36:51 -08:00
Eric Abrahamsen
d22a914c79 Fix defgeneric name of gnus-search-index(ed)-extract
* lisp/gnus/gnus-search.el (gnus-search-indexed-extract): Had the
wrong name on the generic.
2020-11-11 10:35:20 -08:00
Eric Abrahamsen
795b7da16b Add more protections to gnus-search query parsing
* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): If the query is coming in via
the old 'nnir-query-spec key, we know not to parse it.
* lisp/gnus/gnus-search.el (gnus-search-make-query-string): Check if
the query was sent in as '(query "query"), and not '(query . "query).
(gnus-search-imap-search-keys): Add x-gm-raw to imap search keys.
(gnus-search-prepare-query): If we know this query should be raw,
don't even try parsing it, as it probably won't work.
2020-11-08 16:35:19 -08:00
Eric Abrahamsen
33c7ddd47d Another backwards-compatibility fix for gnus-search
* lisp/gnus/gnus-search.el (gnus-search-server-to-engine): Because of
the way we've set up the obsolete variable alias for
`nnir-method-default-engines', we may end up with its value in
`gnus-search-default-engines'. Make the check for "old style" values
general, so we catch them no matter where they came from.
2020-11-08 08:39:19 -08:00
Eric Abrahamsen
35d9881809 Various fixes and backward compatibility for gnus-search
* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): Check for and accept the old
nnir-* spec keys.
* lisp/gnus/gnus-search.el (shared-initialize): Use
generate-new-buffer instead of doing it ourselves.
(gnus-search-server-to-engine): Raise an informative error explicitly
if we can't find a search engine, rather than letting it fall through
to something less helpful.
(gnus-search-make-spec): Add `gnus-search--complete-key-data' to
`completion-at-point-functions' locally, not globally.
2020-11-07 09:44:10 -08:00
Mattias Engdegård
b7b9bbb93d Rectify skip-set argument
* lisp/gnus/gnus-search.el (gnus-search-query-end-of-input):
Remove brackets that don't belong.  Found by relint.
2020-11-06 23:02:29 +01:00
Mattias Engdegård
aea936562b * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.
A more precise type is desirable but at it is now correct ('list' is not).
2020-11-06 13:55:33 +01:00
Eric Abrahamsen
ac471ff09d Fixes and improvements to gnus-search
* lisp/gnus/gnus-search.el (gnus-search-default-engines): Change type
from a list of two-element lists, to alist. This matches nnir's old
option type, and should make transition easier.
(nnir-imap-default-search-key): Note that variable is obsolete.
(gnus-search-transform-expression): Interpret the "attachment" key as
"body" in imap searches. Allow specifying larger/smaller message size
values in KB or MB units.
(gnus-search-server-to-engine): Fix error in this function, and
clarify somewhat.
2020-11-05 19:47:58 -08:00
Eric Abrahamsen
125956725b Avoid use of eieio-oset-default
* lisp/gnus/gnus-search.el: Replace with an :initform tag on the slot
definition. `symbol-value' is necessary, otherwise the defclass macro
will treat the option as a quoted symbol.
2020-11-04 10:40:25 -08:00
Eric Abrahamsen
9bcdebd9b7 Remove gmane search engine
Remove the gnus-search-gmane class and all associated methods.  If
search functionality is ever resurrected, then revert this commit.

* lisp/gnus/gnus-search.el: Delete code, and remove from default value
of `gnus-search-default-engines'.
2020-11-03 21:20:17 -08:00
Eric Abrahamsen
7fad12c59b New gnus-search library
This library provides a fundamental reworking of the search
functionality previously found in nnir.el.  It uses class-based search
engines to interface with external searching facilities, and a parsed
search query syntax that can search multiple engines.

* lisp/gnus/gnus-search.el: New library containing search
functionality for Gnus.
* doc/misc/gnus.texi: Document.
* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): Remove references to nnir,
change meaning of prefix argument, change values of nnselect-function
and nnselect-args.
* lisp/gnus/nnselect.el: Replace references to nnir
(nnselect-request-article): Use gnus-search functions, and search
criteria.
(nnselect-request-thread, nnselect-search-thread): Use gnus-search
thread search.
(gnus-summary-make-search-group): Switch to use gnus-search function
and arguments.
* test/lisp/gnus/search-tests.el: Tests for new functionality.
2020-11-03 21:20:17 -08:00