From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83940 Path: news.gmane.org!not-for-mail From: Alexander Baier Newsgroups: gmane.emacs.gnus.general Subject: Re: Create a group from a list of message-ids Date: Sat, 30 Nov 2013 19:56:28 +0100 Message-ID: <87d2lh3ehv.fsf@gmail.com> References: <87vbzjs5fk.fsf@gmail.com> <844n71b5nh.fsf@davestoy.home> <871u24c18u.fsf@gmail.com> <87d2lo4zy7.fsf@ericabrahamsen.net> <87siukalp5.fsf@gmail.com> <87txf01uum.fsf@ericabrahamsen.net> <87d2loa812.fsf@gmail.com> <87d2lo1ozp.fsf@ericabrahamsen.net> <877gbwlc3p.fsf@ft.bewatermyfriend.org> <87siujyfh0.fsf@ericabrahamsen.net> <87zjooivk4.fsf@gmail.com> <87eh5zg9i5.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1385837872 14024 80.91.229.3 (30 Nov 2013 18:57:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Nov 2013 18:57:52 +0000 (UTC) Cc: ding@gnus.org To: Eric Abrahamsen Original-X-From: ding-owner+M32195@lists.math.uh.edu Sat Nov 30 19:57:56 2013 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vmpjm-0004mc-6q for ding-account@gmane.org; Sat, 30 Nov 2013 19:57:54 +0100 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 1Vmpiu-00085T-Nf; Sat, 30 Nov 2013 12:57:00 -0600 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 1Vmpir-00085E-9j for ding@lists.math.uh.edu; Sat, 30 Nov 2013 12:56:57 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1Vmpip-0005mQ-LW for ding@lists.math.uh.edu; Sat, 30 Nov 2013 12:56:56 -0600 Original-Received: from mail-qa0-f41.google.com ([209.85.216.41]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1Vmpio-0000w6-3l for ding@gnus.org; Sat, 30 Nov 2013 19:56:54 +0100 Original-Received: by mail-qa0-f41.google.com with SMTP id j5so2931010qaq.0 for ; Sat, 30 Nov 2013 10:56:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:mail-followup-to:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=6uFri1+0URtqWBTFcSmJfiCxy9DcnJq/NvUE3VANe4c=; b=n0X/OasUFfF/XfsrUGRzhnZWoJp81IZu/UUm+Rf63EKX13QwuzhkcoQEJ+N7BIawMt 4sJjWi/U8aUsSP4CuYJFUQ1XsQzPgKmV2yZlmuL8+JVsZLtGG2dXzrhkyku+hBV8YqKc DeUHPgxP/QuoEDUbBkwcMXuU7HIjT7eH2I6bPj6IrmQTwkxUk3Kv3WnzQOUU76Z2dkbQ Ik2MJV8vYwK25DVguSiFLSaA5S4p7XRipkrM3UmIbibOEk1rcW2zdE04msFNAXmyem6f X0qyUolj8Eg2YsTc35myLe/MUL942M0ifPbBVLhDUY/vRKlUiYc04czEKVP0zUvYHSb2 N0JA== X-Received: by 10.49.52.102 with SMTP id s6mr62587377qeo.60.1385837807948; Sat, 30 Nov 2013 10:56:47 -0800 (PST) Original-Received: from T420s (HSI-KBW-046-005-177-249.hsi8.kabel-badenwuerttemberg.de. [46.5.177.249]) by mx.google.com with ESMTPSA id z16sm46719119qab.3.2013.11.30.10.56.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Nov 2013 10:56:47 -0800 (PST) Mail-Followup-To: Eric Abrahamsen , ding@gnus.org In-Reply-To: <87eh5zg9i5.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 29 Nov 2013 10:41:22 +0700") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) X-Spam-Score: -3.0 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83940 Archived-At: On 13-11-29 04:41 Eric Abrahamsen wrote: > Alexander Baier writes: > >> On 13-11-26 05:06 Eric Abrahamsen wrote: >>> Frank Terbeck writes: >>> >>>> Eric Abrahamsen wrote: >>>> [...] >>>>> It also comes with its own tagging structure and all kinds of stuff I >>>>> don't use. The superfluity bugs me a little, but the searching is nice >>>>> enough that it doesn't matter. A nnir plugin for notmuch might actual= ly >>>>> be nice. >>>> >>>> Actually, at least in the git version of gnus, =E2=80=98nnir=E2=80=99 = seems to feature >>>> support for =E2=80=98notmuch=E2=80=99 (ie. there is a defcustom =E2=80= =98nnir-notmuch-program=E2=80=99 >>>> and a defun =E2=80=98nnir-run-notmuch=E2=80=99). >>>> >>>> Since =E2=80=98mu=E2=80=99 seems to work fairly similarly to notmuch, = I would guess >>>> that, this part would serve as a source for ideas for =E2=80=98mu=E2= =80=99-integration. >>>> >>>> Regards, Frank >>> >>> Thanks to both of you for pointing that out! I had no idea that was >>> there, but would definitely prefer using a more gnus-y interface. I set >>> it up like so: >>> >>> (setq nnir-method-default-engines '((nnimap . notmuch) (nntp . gmane))) >>> >>> And gave it a shot. >>> >>> It didn't work for me for two reasons. I have several different imap >>> servers, all run through dovecot with a maildir structure. They're all >>> under ~/.mail, like ~/.mail/acc1 ~/mail/acc2 etc. That means >>> nnir-notmuch-remove-prefix has to be set to an appropriate value for >>> each server, which you can do with server parameters. But that means you >>> can only search one server at a time (which I guess you'd do by putting >>> a notmuch-group key into the query? I don't even know how to do that). >>> That isn't really what I want -- I'd like to search all my mail at once. >>> And even if I had to do it server by server, it seems like >>> `nnir-run-notmuch' should be able to figure out how to filter to that >>> server by itself... > > [...] > >> Hi Eric, >> >> I am digging this up again, as I had some time to look at this myself >> and maybe have an idea of how to tackle this problem. >> >> Now, as I see it, the thing preventing us from searching multiple >> servers is the fact that nnir-compose-result might be passed a server >> that does not fit to the matched article as this may come from a >> different server. So I think, solving this problem is "just" a matter >> of teaching nnir-compose-result to correct the server it is passed in >> case it does not fit to the matched article. For nnir-compose-result to >> be able to so we need to tell it how to extract the server from the >> dirnam parameter. The question is, how do we tell nnir-compose-result >> this? Do you have any ideas on this? > > Right now, servers to search are chosen with > `gnus-group-make-nnir-group', which does one of three things: > > 1. Extracts the server from the group under point > 2. Extracts server from the marked groups, if groups are marked > 3. If we're in the *Server* buffer, use the server under point > > Options one and three obviously only provide a single server, option two > results in something like this (I marked the INBOXs of three different ac= counts): > > (("nnimap:acc1" ("nnimap+acc1:INBOX")) > ("nnimap:acc2" ("nnimap+acc2:INBOX")) > ("nnimap:acc3" ("nnimap+acc3:INBOX"))) > > What eventually happens is that `nnir-run-query' loops > over each server in the above sexp (ignoring the group), and calls > `nnir-run-notmuch' once for each server. Each loop passes the same > search results to `nnir-compose-results', which filters the results > based on the current server. > > So theoretically if you'd marked one group from each of the accounts you > wanted to search, you'd get full results. We should be able to do the > same thing by wrapping `gnus-group-make-nnir-group' and force-feeding it > arguments: > > (setq notmuch-servers-to-search '(("nnimap:acc1") > ("nnimap:acc2") > ("nnimap:acc3"))) > > (defun nnir-search-all-servers (&optional query-spec) > (interactive) > (setq query-spec (or query-spec > (list (cons 'query > (read-string "Query: " nil 'nnir-search-history))))) > (gnus-group-make-nnir-group > nil (list > (cons 'nnir-query-spec query-spec) > (cons 'nnir-group-spec notmuch-servers-to-search)))) > > > Can you set notmuch-servers-to-search appropriately, and test that? It's > hard for me to test as I'm still having the "is it maildir or isn't it" > problem, as well as the "I don't have an INBOX" problem. > > Thanks, > Eric > > > Hi Eric, I tested your code and it seems to do exactly what you are describing. There is, however, another problem I am facing, that produces a nil as article number in some or all of the results (vectors with 3 elements) returned by nnir-compose-result. I have not figured out how to solve this but will follow up as soon as I find something. So long, --=20 Alexander Baier