Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 22 / 0a6b0fe3b96320630eaa0f8726eaaf47dc5e46
1 Return-Path: <aclements@csail.mit.edu>\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 olra.theworths.org (Postfix) with ESMTP id 1DCF0431FB6\r
6         for <notmuch@notmuchmail.org>; Tue, 21 Oct 2014 18:51:09 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id hdepnvN9TTz6 for <notmuch@notmuchmail.org>;\r
16         Tue, 21 Oct 2014 18:51:01 -0700 (PDT)\r
17 Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149])\r
18         by olra.theworths.org (Postfix) with ESMTP id A9137431FAE\r
19         for <notmuch@notmuchmail.org>; Tue, 21 Oct 2014 18:51:01 -0700 (PDT)\r
20 Received: from [104.131.20.129] (helo=awakeningjr)\r
21         by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)\r
22         (Exim 4.72) (envelope-from <aclements@csail.mit.edu>)\r
23         id 1Xgl4n-0005IZ-A2; Tue, 21 Oct 2014 21:51:01 -0400\r
24 Received: from amthrax by awakeningjr with local (Exim 4.84)\r
25         (envelope-from <aclements@csail.mit.edu>)\r
26         id 1Xgl4n-0000IQ-1j; Tue, 21 Oct 2014 21:51:01 -0400\r
27 Date: Tue, 21 Oct 2014 21:51:01 -0400\r
28 From: Austin Clements <aclements@csail.mit.edu>\r
29 To: Mark Walters <markwalters1009@gmail.com>\r
30 Subject: Re: [PATCH v2 12/12] lib: Remove unnecessary thread linking steps\r
31         when    using ghost messages\r
32 Message-ID: <20141022015101.GF7970@csail.mit.edu>\r
33 References: <1412637438-4821-1-git-send-email-aclements@csail.mit.edu>\r
34         <1412637438-4821-13-git-send-email-aclements@csail.mit.edu>\r
35         <87wq7thv27.fsf@qmul.ac.uk>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain; charset=us-ascii\r
38 Content-Disposition: inline\r
39 In-Reply-To: <87wq7thv27.fsf@qmul.ac.uk>\r
40 User-Agent: Mutt/1.5.23 (2014-03-12)\r
41 Cc: notmuch@notmuchmail.org\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Wed, 22 Oct 2014 01:51:09 -0000\r
55 \r
56 Quoth Mark Walters on Oct 22 at 12:17 am:\r
57 > On Tue, 07 Oct 2014, Austin Clements <aclements@csail.mit.edu> wrote:\r
58 > > From: Austin Clements <amdragon@mit.edu>\r
59 > >\r
60 > > Previously, it was necessary to link new messages to children to work\r
61 > > around some (though not all) problems with the old metadata-based\r
62 > > approach to stored thread IDs.  With ghost messages, this is no longer\r
63 > > necessary, so don't bother with child linking when ghost messages are\r
64 > > in use.\r
65 > > ---\r
66 > >  lib/database.cc | 21 +++++++++++++++++----\r
67 > >  1 file changed, 17 insertions(+), 4 deletions(-)\r
68 > >\r
69 > > diff --git a/lib/database.cc b/lib/database.cc\r
70 > > index 1316529..6e51a72 100644\r
71 > > --- a/lib/database.cc\r
72 > > +++ b/lib/database.cc\r
73 > > @@ -2169,10 +2169,23 @@ _notmuch_database_link_message (notmuch_database_t *notmuch,\r
74 > >      if (status)\r
75 > >     goto DONE;\r
76 > >  \r
77 > > -    status = _notmuch_database_link_message_to_children (notmuch, message,\r
78 > > -                                                    &thread_id);\r
79 > > -    if (status)\r
80 > > -   goto DONE;\r
81 > > +    if (! (notmuch->features & NOTMUCH_FEATURE_GHOSTS)) {\r
82 > > +   /* In general, it shouldn't be necessary to link children,\r
83 > > +    * since the earlier indexing of those children will have\r
84 > > +    * stored a thread ID for the missing parent.  However, prior\r
85 > > +    * to ghost messages, these stored thread IDs were NOT\r
86 > > +    * rewritten during thread merging (and there was no\r
87 > > +    * performant way to do so), so if indexed children were\r
88 > > +    * pulled into a different thread ID by a merge, it was\r
89 > > +    * necessary to pull them *back* into the stored thread ID of\r
90 > > +    * the parent.  With ghost messages, we just rewrite the\r
91 > > +    * stored thread IDs during merging, so this workaround isn't\r
92 > > +    * necessary. */\r
93 > > +   status = _notmuch_database_link_message_to_children (notmuch, message,\r
94 > > +                                                        &thread_id);\r
95 > > +   if (status)\r
96 > > +       goto DONE;\r
97 > > +    }\r
98\r
99 > Ok so this basically answers my earlier comment. It might be worth\r
100 > updating the big comment at the start of the function to match the new\r
101 > code though.\r
102 \r
103 Like so?\r
104 \r
105 diff --git a/lib/database.cc b/lib/database.cc\r
106 index d063ec8..3601f9d 100644\r
107 --- a/lib/database.cc\r
108 +++ b/lib/database.cc\r
109 @@ -2136,11 +2136,11 @@ _consume_metadata_thread_id (void *ctx, notmuch_database_t *notmuch,\r
110   * reference 'message'.\r
111   *\r
112   * In all cases, we assign to the current message the first thread ID\r
113 - * found (through either parent or child). We will also merge any\r
114 - * existing, distinct threads where this message belongs to both,\r
115 - * (which is not uncommon when messages are processed out of order).\r
116 + * found. We will also merge any existing, distinct threads where this\r
117 + * message belongs to both, (which is not uncommon when messages are\r
118 + * processed out of order).\r
119   *\r
120 - * Finally, if no thread ID has been found through parent or child, we\r
121 + * Finally, if no thread ID has been found through referenced messages, we\r
122   * call _notmuch_message_generate_thread_id to generate a new thread\r
123   * ID. This should only happen for new, top-level messages, (no\r
124   * References or In-Reply-To header in this message, and no previously\r
125 \r
126 \r
127 > Best wishes\r
128\r
129 > Mark\r
130\r
131 > >  \r
132 > >      /* If not part of any existing thread, generate a new thread ID. */\r
133 > >      if (thread_id == NULL) {\r
134 > >\r
135 > > _______________________________________________\r
136 > > notmuch mailing list\r
137 > > notmuch@notmuchmail.org\r
138 > > http://notmuchmail.org/mailman/listinfo/notmuch\r