From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/73431 Path: news.gmane.org!not-for-mail From: Andrew Cohen Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus search Date: Thu, 21 Oct 2010 14:25:39 -0400 Message-ID: <87sjzz9zdo.fsf@andy.bu.edu> References: <87eibjzd2q.fsf@pcuds33.cern.ch> <87eibjbfb8.fsf@andy.bu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1287685562 28731 80.91.229.12 (21 Oct 2010 18:26:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 21 Oct 2010 18:26:02 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M21802@lists.math.uh.edu Thu Oct 21 20:26:01 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8zpw-0001g4-1q for ding-account@gmane.org; Thu, 21 Oct 2010 20:26:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1P8zpt-0005lZ-M1; Thu, 21 Oct 2010 13:25:57 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1P8zps-0005lJ-6J for ding@lists.math.uh.edu; Thu, 21 Oct 2010 13:25:56 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1P8zpq-00051b-Ud for ding@lists.math.uh.edu; Thu, 21 Oct 2010 13:25:55 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1P8zpq-0002jg-00 for ; Thu, 21 Oct 2010 20:25:54 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P8zpm-0001aA-To for ding@gnus.org; Thu, 21 Oct 2010 20:25:50 +0200 Original-Received: from andy.bu.edu ([128.197.41.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Oct 2010 20:25:50 +0200 Original-Received: from cohen by andy.bu.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Oct 2010 20:25:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: andy.bu.edu User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:8tNcpsjyz09VwatLjGJhcGEDGrw= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:73431 Archived-At: --=-=-= Content-Type: text/plain Untested patch. Can someone who doesn't have an nnir method set for nnimap servers give this is a try? Andy --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=nnir.diff Content-Description: nnimap auto search diff --git a/lisp/nnir.el b/lisp/nnir.el index 2a264d1..a6a561e 100644 --- a/lisp/nnir.el +++ b/lisp/nnir.el @@ -1606,7 +1606,10 @@ and concat the results." search-func) (setq search-func (cadr (assoc - (nnir-read-server-parm 'nnir-search-engine server) nnir-engines))) + (or (nnir-read-server-parm + 'nnir-search-engine server) + (when (eq 'nnimap (car + (gnus-server-to-method server))) 'imap)) nnir-engines))) (if search-func (funcall search-func q server x) nil))) @@ -1617,9 +1620,12 @@ and concat the results." (if (and (equal (cadr x) 'ok) (not (equal (cadar x) "-ephemeral"))) (let ((server (format "%s:%s" (caar x) (cadar x))) search-func) - (setq search-func (cadr - (assoc - (nnir-read-server-parm 'nnir-search-engine server) nnir-engines))) + (setq search-func (cadr + (assoc + (or (nnir-read-server-parm + 'nnir-search-engine server) + (when (eq 'nnimap (car + (gnus-server-to-method server))) 'imap)) nnir-engines))) (if search-func (funcall search-func q server nil) nil)) --=-=-=--