Commit cd178df2 authored by Andrew Cohen's avatar Andrew Cohen Committed by Katsumi Yamaoka
Browse files

nnir.el (nnir-run-imap): Allow sending IMAP search patterns directly.

parent 6f33b4d7
2010-09-25 Andrew Cohen <cohen@andy.bu.edu> (tiny change)
* nnir.el (nnir-run-imap): Allow sending IMAP search patterns
directly.
2010-09-25 Lars Magne Ingebrigtsen <larsi@gnus.org> 2010-09-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
   
* gnus.el (gnus-local-domain): Put gnus-local-domain back again, since * gnus.el (gnus-local-domain): Put gnus-local-domain back again, since
......
...@@ -345,14 +345,16 @@ ...@@ -345,14 +345,16 @@
(gnus-declare-backend "nnir" 'mail) (gnus-declare-backend "nnir" 'mail)
(defvar nnir-imap-search-field "TEXT" (defvar nnir-imap-search-field "TEXT"
"The IMAP search item when doing an nnir search") "The IMAP search item when doing an nnir search. To use raw
imap queries by default set this to \"\"")
(defvar nnir-imap-search-arguments (defvar nnir-imap-search-arguments
'(("Whole message" . "TEXT") '(("Whole message" . "TEXT")
("Subject" . "SUBJECT") ("Subject" . "SUBJECT")
("To" . "TO") ("To" . "TO")
("From" . "FROM") ("From" . "FROM")
(nil . "HEADER \"%s\"")) ("Head" . "HEADER \"%s\"")
(nil . ""))
"Mapping from user readable strings to IMAP search items for use in nnir") "Mapping from user readable strings to IMAP search items for use in nnir")
(defvar nnir-imap-search-argument-history () (defvar nnir-imap-search-argument-history ()
...@@ -981,8 +983,11 @@ details on the language and supported extensions" ...@@ -981,8 +983,11 @@ details on the language and supported extensions"
(message "Searching %s..." group) (message "Searching %s..." group)
(let ((arts 0) (let ((arts 0)
(result (result
(nnimap-command "UID SEARCH %s" (nnimap-command "UID SEARCH %s"
(nnir-imap-make-query criteria qstring)))) (if (string= criteria "")
qstring
(nnir-imap-make-query criteria qstring)
))))
(mapc (mapc
(lambda (artnum) (lambda (artnum)
(push (vector group artnum 1) artlist) (push (vector group artnum 1) artlist)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment