From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87552 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: any partial or rudamentary documentation of new nnselect work somewhere? Date: Fri, 12 May 2017 09:18:50 +0800 Message-ID: <87a86ioosl.fsf@ericabrahamsen.net> References: <86r301wqx2.fsf@local.lan> <87y3u9bk86.fsf@hanan> <867f1oxwsb.fsf@local.lan> <87fugcz2fu.fsf@hanan> <86o9uzwnh4.fsf@local.lan> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1494552039 19750 195.159.176.226 (12 May 2017 01:20:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 12 May 2017 01:20:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: ding@gnus.org Original-X-From: ding-owner+m35767@lists.math.uh.edu Fri May 12 03:20:35 2017 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from mxfilter-048034.atla03.us.yomura.com ([107.189.48.34]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8zFx-0004zN-Nv for ding-account@gmane.org; Fri, 12 May 2017 03:20:33 +0200 X-Yomura-MXScrub: 1.0 Original-Received: from lists1.math.uh.edu (unknown [129.7.128.208]) by mxfilter-048034.atla03.us.yomura.com (Halon) with ESMTPS id 34116aa2-36b1-11e7-8ed1-b499baa2b07a; Fri, 12 May 2017 01:20:37 +0000 (UTC) Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.87) (envelope-from ) id 1d8zF5-0006Ws-Uj; Thu, 11 May 2017 20:19:40 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1d8zF2-0006W9-6A for ding@lists.math.uh.edu; Thu, 11 May 2017 20:19:36 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.87) (envelope-from ) id 1d8zF0-0005PR-TL for ding@lists.math.uh.edu; Thu, 11 May 2017 20:19:36 -0500 Original-Received: from [195.159.176.226] (helo=blaine.gmane.org) by quimby.gnus.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1d8zEy-0005UJ-3c for ding@gnus.org; Fri, 12 May 2017 03:19:32 +0200 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d8zEp-0003V1-LQ for ding@gnus.org; Fri, 12 May 2017 03:19:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 69 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:QAWrDYChnw6m32TMdITEMO8kOZY= List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87552 Archived-At: Harry Putnam writes: > Andrew Cohen writes: > > [...] > >> Sorry, I hadn't realized that you weren't using search previously. First >> there are two "kinds" of searching---in a summary buffer you can search >> (in a variety of ways, including the regex search you were trying); or >> you can query servers to find articles matching certain search terms. In >> this thread we are only talking about the latter search facility. It is >> usually referred to as "nnir" searching. It is documented in the gnus >> manual under "Searching" (go to info, select gnus, and select the >> searching node). This should give you the information you need to start >> searching (you might have to do some configuration depending on what >> backends you are using). > > [...] > > Sorry, I should have explained the massive holes in my knowledge of gnus. > > Some yrs ago now, I wrote my own search engine in perl... I mean just > a perl script that searched for regex thru thousands of gmane messages > that I had downloaded with the agent. So much downloading that I was > kicked off gmane a few times... probably looked like something > sinister. > > I could search on exact code in perl groups for example ... and return > exact bits of code with careful use of perl regex. > > Later on I added more (perl) code that created a directory and filled > it with symlinks to the actual messages where my regex found hits. I > could then pull that directory into gnus as an ephemeral group or > nndoc inside gnus. > > All very clunky and probably duplicating functionality already in gnus > but in a primitive and homeboy way. Also very slow. It does duplicate what's possible in Gnus (this could be done even with Gnus as it stands now), using an external indexing program like namazu or notmuch. The one big caveat would be that these programs almost certainly wouldn't index perl code correctly -- I haven't tried it, but I'd be very surprised if they did it right. The generalized search functionality that I'm working on (built on Andy's nnselect branch) would let you create all kinds of weird search engine behavior. In theory it wouldn't be hard at all to create a "grep" mixin class for the indexed search engines, that accepted an additional "grep:" key, and ran the grep over the results of the initial search. Ie, you could enter the search string: subject:"having a problem" grep:"my ($smith, $jones) = @a;" since:3m The subject: and since: keys would be passed to the underlying search engine (notmuch or mairix, etc), which would return a first round of results very quickly. The results are in the form of filenames, so the grep: key could then be used to do a second pass over those files. A best-of-both-worlds situation. That sounds pretty useful. Maybe there's no need for a mixin class at all; this could be a standard feature of the indexed search class. If grep wasn't available on the system, you'd just get a polite note to that effect. Actually, there's already a regexp syntax: surrounding text with forward slashes. Search engines that don't handle regexps could simply transform "body:/(.*)/" into "grep:(.*)"... Hmmm...