From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66819 Path: news.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: NNIR, IMAP SEARCH, and the infinite pain of search terms. Date: Mon, 14 Apr 2008 21:54:18 +1000 Organization: Cybersource: Australia's Leading Linux and Open Source Solutions Company Message-ID: <87iqyklkid.fsf@rimspace.net> References: <87r6hu3hml.fsf@enki.rimspace.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208174534 10945 80.91.229.12 (14 Apr 2008 12:02:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2008 12:02:14 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M15301@lists.math.uh.edu Mon Apr 14 14:02:51 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 1JlNOL-0003Qp-SU for ding-account@gmane.org; Mon, 14 Apr 2008 14:02:34 +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 1JlNN2-0001V3-5R; Mon, 14 Apr 2008 07:01:12 -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 1JlNMz-0001Ul-8c for ding@lists.math.uh.edu; Mon, 14 Apr 2008 07:01:09 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1JlNMt-0005Zq-06 for ding@lists.math.uh.edu; Mon, 14 Apr 2008 07:01:09 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1JlNN2-0004aN-00 for ; Mon, 14 Apr 2008 14:01:12 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JlNMm-00011j-Gr for ding@gnus.org; Mon, 14 Apr 2008 12:00:56 +0000 Original-Received: from ppp59-167-189-244.static.internode.on.net ([59.167.189.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Apr 2008 12:00:56 +0000 Original-Received: from daniel by ppp59-167-189-244.static.internode.on.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Apr 2008 12:00:56 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp59-167-189-244.static.internode.on.net User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:5T8peg73mtKF9wao6K8ng8Kj+Ew= X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66819 Archived-At: Reiner Steib writes: > 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. [...] > Installed. Thanks for your contribution. Sorry for the delay. No problem. I still have, on my task list, implementing a generic query language for nnir, then passing that to the appropriate back-ends, so /hopefully/ this will not be the last you see of that. > 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. Hrm. Well, the purpose of the change is: * 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. Implement a query language for IMAP search, parse that and compose the back-end query from it. This allows searches with AND, OR and fixed strings, not just a single substring. I don't think that meets the GNU coding standards, though, which I confess have never made much sense to me for changes like this.[1] For something in news that summary would definitely fit, or something adapted from my comments above. Regards, Daniel Footnotes: [1] I can't see how anything meaningful can be recorded in the style requested, and welcome pointers to a better guide.