finding incoming messages in threads in which i've participated [was: Re: find threads where I and Jian participated but not Dave]
Jani Nikula
jani at nikula.org
Sun Aug 20 06:48:16 PDT 2017
On Sun, 25 Jun 2017, David Bremner <david at tethera.net> wrote:
> Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:
>
>>
>> For example, would it make sense to have "notmuch new" (and "notmuch
>> insert") do "thread-based propagation" of specific tags? for example,
>> consider the following (i've just made up the config options):
>>
>> notmuch config set new.from_self_tags participated
>> notmuch config set new.propagate_thread_tags participated
>>
>> the idea is that "new.from_self_tags" would be applied by "notmuch new" or
>> "notmuch insert" if the message was explicitly from: user.primary_email
>> or user.other_email.
>
> At the moment I'm more inclined to work on "doing things right" by
> adding xapian documents (database items) for threads. Many of the ideas
> in this thread amount to working around their absence. OTOH, it's
> certainly true that this last idea (unlike some of the query ideas)
> would be relatively straightforward to impliment.
I admit I didn't thoroughly read the entire thread... but I think
there's an alternative to adding thread documents, with reasonable
design, to address the original problem in this thread.
Have a new prefix that evaluates to the threads of the sub-query passed
as the prefix value, say thread-of:<query> that you could use as part of
the query. (Or, make thread: work on queries as well as thread IDs.)
The original query in this thread becomes:
thread-of:"from:me" and thread-of:"from:jian" and not thread-of:"from:dave".
As a side effect, this also makes thread: queries portable across
databases via thread-of:"id:<message-id>".
I think this should be doable in current Xapian that supports custom
prefix handlers.
IIRC the idea was suggested by Austin ages ago.
BR,
Jani.
More information about the notmuch
mailing list