Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: Testers wanted: New gnus backend nnselect
Date: Tue, 25 Apr 2017 08:33:30 -0700	[thread overview]
Message-ID: <8737cwa4dx.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <871sshcppr.fsf@hanan>

Andrew Cohen <cohen@bu.edu> writes:

[...]

> Great! But there is one quirk to keep in mind. If you start in a
> "normal" group (like one with an imap backend) you can't (easily) insert
> articles from other groups into the same summary buffer. If you look at
> nnimap-request-thread you will notice that if
> gnus-refer-thread-use-search is nil then only the current group is
> probed for thread articles. But if its non-nil then it defers to
> nnselect-search-thread which creates a NEW nnselect ephemeral buffer to
> allow the results to cross groups. You can probably implement this in 
> new nnfoo-request-thread methods for all the backends.
>
> The function nnselect-request-thread is called only when referring a
> thread from an nnselect group. The only way it is engine specific right
> now is in the construction of the search query string
> (nnimap-make-thread-query). So you could provide a function
> nnir-make-thread-query (or better yet encapsulate the whole nnir related
> stuff in nnselect-request-thread into a function like nnir-refer-thread)
> and this would make the function fully universal (and keep all the
> search-related junk in nnir where it belongs)
>
> Then this same function can be used in nnselect-search-thread,
> easy-peasy.
>
> Sorry, re-reading the above paragraphs I might not have been clear (but
> maybe I was?) And I guess I'm suggesting the function should be called
> gnus-refer-thread.
>
> And of course I meant gnus-search-refer-thread :)

My eyes did cross for a second there, reading the above :)

But I think I've got the basics, and will have a look at the details
over the next week. My goal is definitely to make the search code
completely backend agnostic, so that all nnselect-request-thread has to
do is call a single function.

What I'm thinking now is to make thread search a part of the basic query
language. In fact, there would be a few "meta search terms" that could
be specified along with the base query. "thread:t" would be one of them,
along with "count:t", "limit:NN", and "sort:<field>,<field>" (obviously
they can't all be used in conjunction).

The syntax for searching for a single message's thread would be
"thread:t id:<sdfsdf@sdf>". That would get parsed into:

('nnir-query-spec ('query ((id . "<sdfsdf@sdf>")))
                  ('thread t))

It would be up to the search engines to make sense of that.

Eric




  parent reply	other threads:[~2017-04-25 15:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24  3:02 Andrew Cohen
2017-04-24 20:52 ` Eric Abrahamsen
2017-04-25  0:09   ` Andrew Cohen
2017-04-25  1:01     ` Andrew Cohen
2017-04-25 15:33     ` Eric Abrahamsen [this message]
2017-04-27 16:03 ` Harry Putnam
2017-04-27 18:24   ` Eric Abrahamsen
2017-04-28 14:53     ` Harry Putnam
2017-04-28 15:23       ` Eric Abrahamsen
2017-04-28 15:44         ` Harry Putnam
     [not found] ` <8eff03d9274e4d0fa58c85a87381706f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
     [not found]   ` <87vapp6izc.fsf@delle7240>
2017-04-28 15:34     ` Eric Abrahamsen
2018-04-11 19:44 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737cwa4dx.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).