From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66805 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: NNIR, IMAP SEARCH, and the infinite pain of search terms. Date: Sun, 13 Apr 2008 16:05:12 +0200 Message-ID: References: <87r6hu3hml.fsf@enki.rimspace.net> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208095666 15918 80.91.229.12 (13 Apr 2008 14:07:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Apr 2008 14:07:46 +0000 (UTC) Cc: ding@gnus.org To: Daniel Pittman Original-X-From: ding-owner+M15287@lists.math.uh.edu Sun Apr 13 16:08:24 2008 connect(): Connection refused 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.50) id 1Jl2sY-0006Gz-QW for ding-account@gmane.org; Sun, 13 Apr 2008 16:08:23 +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 1Jl2rq-0002sD-Ib; Sun, 13 Apr 2008 09:07:38 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Jl2rp-0002s2-Dw for ding@lists.math.uh.edu; Sun, 13 Apr 2008 09:07:37 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1Jl2rj-0003kt-5X for ding@lists.math.uh.edu; Sun, 13 Apr 2008 09:07:37 -0500 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Jl2rt-0001FH-00 for ; Sun, 13 Apr 2008 16:07:41 +0200 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id m3DE7Slt000820; Sun, 13 Apr 2008 16:07:28 +0200 (MEST) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id EB97113036; Sun, 13 Apr 2008 16:07:27 +0200 (CEST) X-Face: mtjf/D:es1T0wHO:&CJ'ZXe"l;3C--rw\z!{`eFwL){|]RpI+4{u25L=5C /0>KuGeTsk<~<&NE-AKV1560e!+RJeyWmSskkrJm?[vUV#66{T_m|Ae<||Ku#Mk5`y&O`n~z2;n8eP J5#2h@2eQgV@E70IY_0WlEx!"&giy{+\%h1LJox$zv@/l%ZmU4^tZA>xQpnkUBVC5.jpg#0'(+2?Rs )NAr:>3<=WxHE$ktbLysDIM5TbmHu*3, ding@gnus.org In-Reply-To: <87r6hu3hml.fsf@enki.rimspace.net> (Daniel Pittman's message of "Mon, 10 Dec 2007 22:37:38 +1100") User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2.50 (gnu/linux) X-DCC-debian-Metrics: poseidon 1169; Body=2 Fuz1=2 Fuz2=2 X-Virus-Scanned: by amavisd-new X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66805 Archived-At: On Mon, Dec 10 2007, Daniel Pittman wrote: > Gnus contains, in contrib/, the nnir.el interface to search engines. > This is a nice tool and, pleasantly, supports IMAP SEARCH to give me > efficient searching of my IMAP mail ... or so I thought. > > The biggest problem I had was that it would never seem to find the mail > I expected, so I didn't use it much. > > After inspecting the code the reason became clear: the search was a > single "exact substring" match performed, not the logical sort of search > that I have come to expect with Google and other search engines. > > So... the IMAP SEARCH command doesn't do any clever parsing or > anything; the front end software has to do that. > > Attached is my first "draft" of a more complex search front-end for NNIR > and IMAP SEARCH -- it parses the query, translates that into a suitable > IMAP SEARCH command and returns the results. > > This is *much* less surprising to me: it returns what I expect, most of > the time, and takes the sort of input I would expect as well. > > At the moment it only handles basic searching, as documented in the > `nnir-imap-make-query' function in the patch. > > I plan to extend this to support the full range of operators that IMAP > SEARCH supports, but wanted to seek feedback on the initial > implementation first. > > I have signed papers assigning Gnus changes already, so there should be > no legal reason that this is rejected. Installed. Thanks for your contribution. Sorry for the delay. Could you please suggest an improved variant of my minimal ChangeLog entry? * nnir.el (nnir-run-imap): Add doc string. Use `nnir-imap-make-query'. (nnir-imap-make-query, nnir-imap-query-to-imap) (nnir-imap-expr-to-imap, nnir-imap-parse-query, nnir-imap-next-expr) (nnir-imap-peek-symbol, nnir-imap-next-symbol) (nnir-imap-delimited-string, nnir-imap-end-of-input): New functions. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/