Re: [PATCH] create .mailmap file (for git shortlog/blame)
[notmuch-archives.git] / 8d / 820f5b190e867afbadedb3c3528042f2831046
1 Return-Path: <dkg@fifthhorseman.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id 609E16DE0319\r
6  for <notmuch@notmuchmail.org>; Mon,  4 Apr 2016 11:24:02 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.032\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.032 tagged_above=-999 required=5\r
12  tests=[AWL=-0.032] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id u35Dz1b8793D for <notmuch@notmuchmail.org>;\r
16  Mon,  4 Apr 2016 11:23:54 -0700 (PDT)\r
17 Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])\r
18  by arlo.cworth.org (Postfix) with ESMTP id D98ED6DE0243\r
19  for <notmuch@notmuchmail.org>; Mon,  4 Apr 2016 11:23:53 -0700 (PDT)\r
20 Received: from fifthhorseman.net (dhcp-a320.meeting.ietf.org [31.133.163.32])\r
21  by che.mayfirst.org (Postfix) with ESMTPSA id 3A937F991\r
22  for <notmuch@notmuchmail.org>; Mon,  4 Apr 2016 14:23:50 -0400 (EDT)\r
23 Received: by fifthhorseman.net (Postfix, from userid 1000)\r
24  id AA0FB2018C; Mon,  4 Apr 2016 15:23:43 -0300 (BRT)\r
25 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
26 To: Notmuch Mail <notmuch@notmuchmail.org>\r
27 Subject: Re: thread merge/split proposal\r
28 In-Reply-To: <87mvp9uwi4.fsf@alice.fifthhorseman.net>\r
29 References: <87mvp9uwi4.fsf@alice.fifthhorseman.net>\r
30 User-Agent: Notmuch/0.21+124~gbf604e9 (http://notmuchmail.org) Emacs/24.5.1\r
31  (x86_64-pc-linux-gnu)\r
32 Date: Mon, 04 Apr 2016 15:23:43 -0300\r
33 Message-ID: <87k2kdutao.fsf@alice.fifthhorseman.net>\r
34 MIME-Version: 1.0\r
35 Content-Type: text/plain\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.20\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40  <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
42  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
47  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Mon, 04 Apr 2016 18:24:02 -0000\r
49 \r
50 On Mon 2016-04-04 14:14:27 -0300, Daniel Kahn Gillmor wrote:\r
51 >   b) when an unjoin is requested, do a graph analysis of every message in\r
52 >      the thread's In-Reply-To and References headers, and recreate\r
53 >      distinct threads from the connected components.\r
54  [...]\r
55 >  From the CLI, it would look something like:\r
56 >\r
57 >    notmuch join-threads THREAD_A THREAD_B [ THREAD_C ... ]\r
58 >    notmuch split-thread THREAD_X\r
59 \r
60 On IRC, bremner pointed out two specific improvements to this proposal:\r
61 \r
62  0) the inverse operation of "join" proposed above is distinct from the\r
63     ongoing discussion about splitting threads in arbitrary places.  I\r
64     don't want to conflate these issues, so my proposed\r
65     connected-component-analysis operation should be "notmuch\r
66     unjoin-thread", and not "notmuch split-thread"\r
67 \r
68  1) a "join" operation probably has to be stored explicitly in the\r
69     database, so that the threads will be re-joined across a\r
70     dump/restore operation.\r
71 \r
72 I'm happy with both of these improvements.\r
73 \r
74 for (1) i'd propose that the join operation would be implemented by\r
75 adding a new term type "join", which can be applied to any document.\r
76 Its value is the message-id of a message that *should* be "in-reply-to"\r
77 but wasn't.\r
78 \r
79 So for example: messages A and B are in one thread; messages C and D\r
80 come in in a separate thread that should have been joined to the prior\r
81 thread but is not.\r
82 \r
83 i propose implementing this as something like:\r
84 \r
85     notmuch_message_add_term(message_c, "join", get_message_id(message_a));\r
86   \r
87     notmuch_message_set_thread_id(message_c, get_thread_id(message_a));\r
88     notmuch_message_set_thread_id(message_d, get_thread_id(message_a));\r
89 \r
90 i'd also add all the "join" terms to "notmuch dump", though i'm not sure\r
91 exactly how to extend the "notmuch dump" format.\r
92 \r
93 feedback welcome,\r
94 \r
95         --dkg\r