From: David Bremner <david@tethera.net>
To: Keith Amidon <camalot@picnicpark.org>, notmuch@notmuchmail.org
Subject: Re: Multiple header sources for an index.header query prefix?
Date: Thu, 05 Aug 2021 07:44:15 -0300 [thread overview]
Message-ID: <87a6lww4qo.fsf@tethera.net> (raw)
In-Reply-To: <aa7237e2-3ff3-fab2-8b92-1c752d6df033@picnicpark.org>
> I started thinking about how I would add this feature and was thinking
> it might be better to support in the configuration by using semi-colon
> separated values like some of the other config options. For example:
>
> [index]
> header.Spam=X-Spam;X-Spam-Result
>
> Does this seem a reasonable way to go? Is this an extension of the
> custom header indexing behavior that you would be interested in?
It sounds reasonable.
> Finally, any suggestions for approaching an implementation? In
> particular, I believe there were some recent changes to also store the
> configuration in the database. Any thoughts on how this suggestion would
> interact with that?
An implementation would need to update
_notmuch_message_index_user_headers to iterate (using
notmuch_config_get_values_string) over the desired headers. Basically
the call to `_notmuch_message_gen_terms` needs to be repeated once for
each header, using the same value for `prefix_name`.
And of course the tests and notmuch-search-terms(7) would need to be
updated.
d
next prev parent reply other threads:[~2021-08-05 10:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 14:56 Multiple header sources for an index.header query prefix? Keith Amidon
2021-08-05 10:44 ` David Bremner [this message]
2021-08-15 19:01 ` Keith Amidon
2021-08-15 19:27 ` David Bremner
2021-08-16 15:20 ` Keith Amidon
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
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a6lww4qo.fsf@tethera.net \
--to=david@tethera.net \
--cc=camalot@picnicpark.org \
--cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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 read-only IMAP folder(s) and NNTP newsgroup(s).