From: Andrew Cohen Date: Sat, 25 Sep 2010 14:24:54 +0000 (+0000) Subject: nnir.el (nnir-run-imap): Allow sending IMAP search patterns directly. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~47^2~42^2~27 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cd178df250c91b24f576a6e7904d70ea1c5c81c1;p=emacs.git nnir.el (nnir-run-imap): Allow sending IMAP search patterns directly. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 0ddf95c3a0d..db1c287e3e5 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2010-09-25 Andrew Cohen (tiny change) + + * nnir.el (nnir-run-imap): Allow sending IMAP search patterns + directly. + 2010-09-25 Lars Magne Ingebrigtsen * gnus.el (gnus-local-domain): Put gnus-local-domain back again, since diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index ec22c78880b..db8b3971787 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -345,14 +345,16 @@ (gnus-declare-backend "nnir" 'mail) (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 '(("Whole message" . "TEXT") ("Subject" . "SUBJECT") ("To" . "TO") ("From" . "FROM") - (nil . "HEADER \"%s\"")) + ("Head" . "HEADER \"%s\"") + (nil . "")) "Mapping from user readable strings to IMAP search items for use in nnir") (defvar nnir-imap-search-argument-history () @@ -981,8 +983,11 @@ details on the language and supported extensions" (message "Searching %s..." group) (let ((arts 0) (result - (nnimap-command "UID SEARCH %s" - (nnir-imap-make-query criteria qstring)))) + (nnimap-command "UID SEARCH %s" + (if (string= criteria "") + qstring + (nnir-imap-make-query criteria qstring) + )))) (mapc (lambda (artnum) (push (vector group artnum 1) artlist)