Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: gnus-search configuration example for notmuch
Date: Wed, 23 Mar 2022 09:37:50 -0700	[thread overview]
Message-ID: <87h77oiq01.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87wnglu48g.fsf@uwo.ca>

Dan Christensen <jdc@uwo.ca> writes:

> On Mar 22, 2022, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:
>
>> To add to what everyone else has said: most of the mail backends (nnml,
>> nnmaildir, etc) keep their messages as files on the file system, so any
>> search engine that indexes files and gives you full filenames back as
>> search results (including notmuch, namazu, mairix) will work with them.
>> It's really nnimap that is a special case, as you're not supposed to
>> know or care where/how it stores its messages, and instead use the
>> client/server interface.
>
> I guess nnfolder is also a special case?  My mail is currently split
> between nnfolder and nnimap (using dovecot), and my current search
> engine is mairix, which can provide its results as a folder full of
> files each containing a single message.  Right now I use nnmairix to
> view my search results, but it is a bit buggy and doesn't have some
> features than gnus-search and nnselect seem to have, so I wouldn't
> mind switching.  But since I'm pretty familiar with the mairix search
> syntax, I'd like to keep using mairix.  Is this not possible?

I don't think nnfolder is a special case: as long as both the Gnus
backend and the search engine deal in absolute file paths, they should
be able to talk to one another. If something special needs to be done to
translate mairix search results into something that nnfolder can
understand, I'd like to know about that and implement it.

You can certainly continue to use mairix. nnmairix creates its own
search groups and populates them; mairix with gnus-search just returns a
list of file paths. If you like using mairix's search syntax, but want
to use the gnus-search syntax for nnimap, you can first set:

(setq gnus-search-use-parsed-queries t)

To parse queries by default, then use _unparsed_ queries for mairix
through one of a few approaches:

1. (setq gnus-search-mairix-raw-queries-p t): all queries against a
   mairix search engine will be unparsed.
2. Add (raw-queries-p t) to the config for one specific mairix search engine
3. Give a C-u prefix to the "G G" search command, for one single search

Note that any of these options mean you won't be able to issue a single
search against multiple groups belonging to nnfolder and nnimap at the
same time; you'll have to use separate searches.

HTH,
Eric



  reply	other threads:[~2022-03-23 16:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 16:10 Julien Cubizolles
2022-03-21 23:33 ` Eric Abrahamsen
2022-03-22  8:16   ` Julien Cubizolles
2022-03-22  9:58     ` Adam Sjøgren
2022-03-22 10:28       ` Eric S Fraga
2022-03-22 11:31       ` Julien Cubizolles
2022-03-22 15:11     ` Eric Abrahamsen
2022-03-22 20:22       ` Dan Christensen
2022-03-23 16:37         ` Eric Abrahamsen [this message]
2022-03-23 17:03           ` Dan Christensen
2022-03-23 19:19             ` Eric Abrahamsen

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=87h77oiq01.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).