unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: thread merge/split proposal
Date: Mon, 04 Apr 2016 15:23:43 -0300	[thread overview]
Message-ID: <87k2kdutao.fsf@alice.fifthhorseman.net> (raw)
In-Reply-To: <87mvp9uwi4.fsf@alice.fifthhorseman.net>

On Mon 2016-04-04 14:14:27 -0300, Daniel Kahn Gillmor wrote:
>   b) when an unjoin is requested, do a graph analysis of every message in
>      the thread's In-Reply-To and References headers, and recreate
>      distinct threads from the connected components.
 [...]
>  From the CLI, it would look something like:
>
>    notmuch join-threads THREAD_A THREAD_B [ THREAD_C ... ]
>    notmuch split-thread THREAD_X

On IRC, bremner pointed out two specific improvements to this proposal:

 0) the inverse operation of "join" proposed above is distinct from the
    ongoing discussion about splitting threads in arbitrary places.  I
    don't want to conflate these issues, so my proposed
    connected-component-analysis operation should be "notmuch
    unjoin-thread", and not "notmuch split-thread"

 1) a "join" operation probably has to be stored explicitly in the
    database, so that the threads will be re-joined across a
    dump/restore operation.

I'm happy with both of these improvements.

for (1) i'd propose that the join operation would be implemented by
adding a new term type "join", which can be applied to any document.
Its value is the message-id of a message that *should* be "in-reply-to"
but wasn't.

So for example: messages A and B are in one thread; messages C and D
come in in a separate thread that should have been joined to the prior
thread but is not.

i propose implementing this as something like:

    notmuch_message_add_term(message_c, "join", get_message_id(message_a));
  
    notmuch_message_set_thread_id(message_c, get_thread_id(message_a));
    notmuch_message_set_thread_id(message_d, get_thread_id(message_a));

i'd also add all the "join" terms to "notmuch dump", though i'm not sure
exactly how to extend the "notmuch dump" format.

feedback welcome,

        --dkg

  reply	other threads:[~2016-04-04 18:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 17:14 thread merge/split proposal Daniel Kahn Gillmor
2016-04-04 18:23 ` Daniel Kahn Gillmor [this message]
2016-04-10 13:16   ` David Bremner
2016-04-11 22:41     ` Daniel Kahn Gillmor
2016-04-12  0:56       ` David Bremner
2016-04-12  1:29         ` Daniel Kahn Gillmor
2016-08-06 23:50           ` David Bremner

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=87k2kdutao.fsf@alice.fifthhorseman.net \
    --to=dkg@fifthhorseman.net \
    --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).