Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 55 / 2d798d0bfd607089eb228303bd409df4dec19f
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 arlo.cworth.org (Postfix) with ESMTP id 7A4686DE0924\r
6  for <notmuch@notmuchmail.org>; Sat,  8 Aug 2015 06:27:19 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.126\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.126 tagged_above=-999 required=5\r
12  tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3,\r
13  RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,\r
14  RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001, URIBL_SBL=0.644,\r
15  URIBL_SBL_A=0.1] autolearn=disabled\r
16 Received: from arlo.cworth.org ([127.0.0.1])\r
17  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
18  with ESMTP id ugghzyetOPjk for <notmuch@notmuchmail.org>;\r
19  Sat,  8 Aug 2015 06:27:17 -0700 (PDT)\r
20 X-Greylist: delayed 1302 seconds by postgrey-1.35 at arlo;\r
21  Sat, 08 Aug 2015 06:27:17 PDT\r
22 Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149])\r
23  by arlo.cworth.org (Postfix) with ESMTP id 2742C6DE02D2\r
24  for <notmuch@notmuchmail.org>; Sat,  8 Aug 2015 06:27:17 -0700 (PDT)\r
25 Received: from mail-qk0-f174.google.com ([209.85.220.174])\r
26  by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_ARCFOUR_SHA1:16)\r
27  (Exim 4.72) (envelope-from <aclements@csail.mit.edu>)\r
28  id 1ZO3oa-0001Kk-UC\r
29  for notmuch@notmuchmail.org; Sat, 08 Aug 2015 09:05:33 -0400\r
30 Received: by qkdv3 with SMTP id v3so45472883qkd.3\r
31  for <notmuch@notmuchmail.org>; Sat, 08 Aug 2015 06:05:32 -0700 (PDT)\r
32 MIME-Version: 1.0\r
33 X-Received: by 10.55.26.93 with SMTP id a90mr23194257qka.63.1439039132115;\r
34  Sat, 08 Aug 2015 06:05:32 -0700 (PDT)\r
35 Received: by 10.96.197.42 with HTTP; Sat, 8 Aug 2015 06:05:31 -0700 (PDT)\r
36 Received: by 10.96.197.42 with HTTP; Sat, 8 Aug 2015 06:05:31 -0700 (PDT)\r
37 In-Reply-To: <87r3ne96li.fsf@maritornes.cs.unb.ca>\r
38 References: <1432936375-astroid-4-0i1n6yczs2-1520@strange>\r
39  <1433525318-23756-1-git-send-email-david@tethera.net>\r
40  <1433525318-23756-3-git-send-email-david@tethera.net>\r
41  <878u9nk0st.fsf@schoepe.localhost>\r
42  <87r3ne96li.fsf@maritornes.cs.unb.ca>\r
43 Date: Sat, 8 Aug 2015 09:05:31 -0400\r
44 Message-ID:\r
45  <CAH-f9WszEhzuSie05+R88kk1kFvHgktCcf3JYbk1+MPEzU6Mjw@mail.gmail.com>\r
46 Subject: Re: [PATCH 2/6] lib: Add per-message last modification tracking\r
47 From: Austin Clements <aclements@csail.mit.edu>\r
48 To: David Bremner <david@tethera.net>\r
49 Content-Type: multipart/alternative; boundary=001a1146cb2a49acdd051ccc688b\r
50 Cc: notmuch <notmuch@notmuchmail.org>\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.18\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55  <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Sat, 08 Aug 2015 13:27:19 -0000\r
64 \r
65 --001a1146cb2a49acdd051ccc688b\r
66 Content-Type: text/plain; charset=UTF-8\r
67 \r
68 Hi David. I haven't had a chance to look back at the original code, but\r
69 your follow-up expanded comment agrees with how I remember this code\r
70 working.\r
71 On Aug 7, 2015 4:41 PM, "David Bremner" <david@tethera.net> wrote:\r
72 \r
73 > Daniel Schoepe <daniel@schoepe.org> writes:\r
74 >\r
75 >\r
76 > > On Fri, 05 Jun 2015 19:28 +0200, David Bremner wrote:\r
77 > >> +        /* Prior to NOTMUCH_FEATURE_LAST_MOD, messages did not\r
78 > >> +         * track modification revisions.  Give all messages a\r
79 > >> +         * revision of 1.\r
80 > >> +         */\r
81 > >> +        if (new_features & NOTMUCH_FEATURE_LAST_MOD)\r
82 > >> +            _notmuch_message_upgrade_last_mod (message);\r
83 > >> [..]\r
84 > >> +/* Upgrade a message to support NOTMUCH_FEATURE_LAST_MOD.  The caller\r
85 > >> + * must call _notmuch_message_sync. */\r
86 > >> +void\r
87 > >> +_notmuch_message_upgrade_last_mod (notmuch_message_t *message)\r
88 > >> +{\r
89 > >> +    /* _notmuch_message_sync will update the last modification\r
90 > >> +     * revision; we just have to ask it to. */\r
91 > >> +    message->modified = TRUE;\r
92 > >> +}\r
93 > >> +\r
94 > >\r
95 > > The comment in the first part says that message without LAST_MOD get a\r
96 > > revision of 1, but as far as I can tell, _notmuch_message_sync will\r
97 > > actually put the next revision number on the message. If this is what's\r
98 > > happening, either the comment or the behavior should be changed,\r
99 > > depending on what's intended.\r
100 >\r
101 > I think the behaviour is OK, but you're correct the comment is\r
102 > wrong. I'll see if Austin has any comment on that. I guess it would be\r
103 > harmless to initialize upgraded messages to some low revision number,\r
104 > but I don't see the benefit.\r
105 >\r
106 \r
107 --001a1146cb2a49acdd051ccc688b\r
108 Content-Type: text/html; charset=UTF-8\r
109 Content-Transfer-Encoding: quoted-printable\r
110 \r
111 <p dir=3D"ltr">Hi David. I haven&#39;t had a chance to look back at the ori=\r
112 ginal code, but your follow-up expanded comment agrees with how I remember =\r
113 this code working.</p>\r
114 <div class=3D"gmail_quote">On Aug 7, 2015 4:41 PM, &quot;David Bremner&quot=\r
115 ; &lt;<a href=3D"mailto:david@tethera.net">david@tethera.net</a>&gt; wrote:=\r
116 <br type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"margin:=\r
117 0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Daniel Schoepe &lt;=\r
118 <a href=3D"mailto:daniel@schoepe.org">daniel@schoepe.org</a>&gt; writes:<br=\r
119 >\r
120 <br>\r
121 <br>\r
122 &gt; On Fri, 05 Jun 2015 19:28 +0200, David Bremner wrote:<br>\r
123 &gt;&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Prior to NOTMUCH_FEATURE_LAST_MOD,=\r
124  messages did not<br>\r
125 &gt;&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* track modification revisions.=\r
126 =C2=A0 Give all messages a<br>\r
127 &gt;&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* revision of 1.<br>\r
128 &gt;&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/<br>\r
129 &gt;&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (new_features &amp; NOTMUCH_FEATUR=\r
130 E_LAST_MOD)<br>\r
131 &gt;&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 _notmuch_message_upgrad=\r
132 e_last_mod (message);<br>\r
133 &gt;&gt; [..]<br>\r
134 &gt;&gt; +/* Upgrade a message to support NOTMUCH_FEATURE_LAST_MOD.=C2=A0 T=\r
135 he caller<br>\r
136 &gt;&gt; + * must call _notmuch_message_sync. */<br>\r
137 &gt;&gt; +void<br>\r
138 &gt;&gt; +_notmuch_message_upgrade_last_mod (notmuch_message_t *message)<br=\r
139 >\r
140 &gt;&gt; +{<br>\r
141 &gt;&gt; +=C2=A0 =C2=A0 /* _notmuch_message_sync will update the last modif=\r
142 ication<br>\r
143 &gt;&gt; +=C2=A0 =C2=A0 =C2=A0* revision; we just have to ask it to. */<br>\r
144 &gt;&gt; +=C2=A0 =C2=A0 message-&gt;modified =3D TRUE;<br>\r
145 &gt;&gt; +}<br>\r
146 &gt;&gt; +<br>\r
147 &gt;<br>\r
148 &gt; The comment in the first part says that message without LAST_MOD get a=\r
149 <br>\r
150 &gt; revision of 1, but as far as I can tell, _notmuch_message_sync will<br=\r
151 >\r
152 &gt; actually put the next revision number on the message. If this is what&=\r
153 #39;s<br>\r
154 &gt; happening, either the comment or the behavior should be changed,<br>\r
155 &gt; depending on what&#39;s intended.<br>\r
156 <br>\r
157 I think the behaviour is OK, but you&#39;re correct the comment is<br>\r
158 wrong. I&#39;ll see if Austin has any comment on that. I guess it would be<=\r
159 br>\r
160 harmless to initialize upgraded messages to some low revision number,<br>\r
161 but I don&#39;t see the benefit.<br>\r
162 </blockquote></div>\r
163 \r
164 --001a1146cb2a49acdd051ccc688b--\r