Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Daniel Jensen <daniel@bigwalter.net>
Cc: ding@gnus.org
Subject: Re: Help testing gnus-search fixups
Date: Fri, 13 Aug 2021 09:50:20 -0700	[thread overview]
Message-ID: <87wnop5lwz.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <877dgtrbz7.fsf@bigwalter.net> (Daniel Jensen's message of "Tue, 10 Aug 2021 09:32:44 +0200")

Daniel Jensen <daniel@bigwalter.net> writes:

> Eric,
>
> I tried your latest gnus-search code, but it didn't work for me. I
> noticed that in gnus-search-indexed-parse-output the `group' variable
> was wrong, resulting in nnmaildir-base-name-to-article-number returning
> nil. This is my setup, having multiple secondary nnmaildir servers:
>
> (setq gnus-secondary-select-methods
>       '((nnmaildir "One" (directory "~/Mail/one/"))
>         (nnmaildir "Two" (directory "~/Mail/two/"))
>         ...)
>       gnus-search-default-engines
>       '((nnmaildir . notmuch)))
>
> I found that I could make it work by giving `prefix' its value from the
> servers at the start of the function. Like so:
>
> (let ((prefix (or (nnmaildir--srv-dir
>                     (alist-get (string-remove-prefix "nnmaildir:" server)
>                                 nnmaildir--servers nil nil #'equal))
>                   ""))
>        ...))
>
> This uses the correct prefix "~/Mail/one/" and so on, not just "~/Mail/"
> from the engine. I have no idea what a general solution would look like.
> It could be my setup that is wrong, I don't know.

Sorry for the slow response, I was camping...

If you're only using one notmuch index, it's enough to set the global
options like `gnus-search-notmuch-remove-prefix'. If you've got two
nnmaildir servers each with its own notmuch index, you'll have to
specific the different prefixes within the engine configuration:

((nnmaildir "One"
   (directory "~/Mail/one/"
     (gnus-search-engine gnus-search-notmuch
       (remove-prefix "~/Mail/one/"))))
 (nnmaildir "Two"
   (directory "~/Mail/two/"
     (gnus-search-engine gnus-search-notmuch
       (remove-prefix "~/Mail/two/")))))

Note how the sexps are nested, it's important that the engine-related
variables go within the engine configuration sexp.

I realize that 'remove-prefix is redundant with the nnmaildir 'directory
setting here, and hope to eventually be able to get rid of that.

Hope that helps,
Eric


  reply	other threads:[~2021-08-13 16:50 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 16:42 Eric Abrahamsen
2021-06-28 18:00 ` Adam Sjøgren
2021-06-28 23:15   ` Eric Abrahamsen
2021-06-29  6:04     ` Thomas Alexander Gerds
2021-06-29  9:30     ` Adam Sjøgren
2021-06-29  9:55       ` Adam Sjøgren
2021-06-29 11:03         ` Thomas Alexander Gerds
2021-06-29 11:13           ` Adam Sjøgren
2021-06-29 11:25             ` Adam Sjøgren
2021-06-30 16:58               ` Eric Abrahamsen
     [not found]                 ` <87bl6tuqcb.fsf@posteo.org>
2021-07-23 15:18                   ` Eric Abrahamsen
     [not found]                     ` <87bl6sual8.fsf@posteo.org>
2021-07-24 22:16                       ` Eric Abrahamsen
2021-07-25 11:17                         ` Alexandr Vityazev
2021-07-25 22:11                           ` Eric Abrahamsen
2021-07-30 18:17                           ` Joseph Mingrone
2021-07-30 18:22                             ` Joseph Mingrone
2021-07-30 18:47                               ` Eric Abrahamsen
2021-07-30 19:29                                 ` Joseph Mingrone
2021-07-30 20:23                                   ` Eric Abrahamsen
2021-07-30 19:34                             ` Alexandr Vityazev
2021-07-30 20:25                               ` Eric Abrahamsen
2021-08-05 17:15                                 ` Eric Abrahamsen
2021-08-05 19:54                                   ` Alexandr Vityazev
2021-08-05 20:19                                     ` Joseph Mingrone
2021-08-05 21:24                                       ` Eric Abrahamsen
2021-08-05 21:38                                         ` Joseph Mingrone
2021-08-07 16:07                                           ` Eric Abrahamsen
2021-08-10  7:32                                             ` Daniel Jensen
2021-08-13 16:50                                               ` Eric Abrahamsen [this message]
2021-08-13 19:30                                                 ` Daniel Jensen
2021-08-13 19:37                                                   ` Eric Abrahamsen
2021-06-29 11:27 ` Eric S Fraga
2021-09-11 13:29 Sergey Makarov
2021-09-11 15:04 ` 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=87wnop5lwz.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=daniel@bigwalter.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).