[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 07 / b85662fb95f3301db5a414e4d05c240e4626c2
1 Return-Path: <david@tethera.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 52B506DE00F5\r
6  for <notmuch@notmuchmail.org>; Thu, 14 Jul 2016 17:23:36 -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.011\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.011 tagged_above=-999 required=5 tests=[AWL=0.000,\r
12   SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 Bko8fvonLmUz for <notmuch@notmuchmail.org>;\r
16  Thu, 14 Jul 2016 17:23:26 -0700 (PDT)\r
17 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
18  by arlo.cworth.org (Postfix) with ESMTPS id C19426DE00C9\r
19  for <notmuch@notmuchmail.org>; Thu, 14 Jul 2016 17:23:26 -0700 (PDT)\r
20 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
21  (envelope-from <david@tethera.net>)\r
22  id 1bNquA-0002Ty-K0; Thu, 14 Jul 2016 20:22:58 -0400\r
23 Received: (nullmailer pid 29663 invoked by uid 1000);\r
24  Fri, 15 Jul 2016 00:23:20 -0000\r
25 From: David Bremner <david@tethera.net>\r
26 To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
27  Notmuch Mail <notmuch@notmuchmail.org>\r
28 Subject: Re: [PATCH v4 09/16] index encrypted parts when asked.\r
29 In-Reply-To: <8737ncmbpy.fsf@alice.fifthhorseman.net>\r
30 References: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net>\r
31  <1467970047-8013-10-git-send-email-dkg@fifthhorseman.net>\r
32  <87lh14e2x8.fsf@tesseract.cs.unb.ca> <8737ncmbpy.fsf@alice.fifthhorseman.net>\r
33 User-Agent: Notmuch/0.22+28~gb9bf3f4 (http://notmuchmail.org) Emacs/24.5.1\r
34  (x86_64-pc-linux-gnu)\r
35 Date: Thu, 14 Jul 2016 21:23:20 -0300\r
36 Message-ID: <8760s7zr47.fsf@zancas.localnet>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.20\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43  <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
45  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
50  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Fri, 15 Jul 2016 00:23:36 -0000\r
52 \r
53 Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:\r
54 \r
55 > It makes no sense to stop indexing a message just because one of the\r
56 > parts failed to decrypt, so i'm not going to immediately return.\r
57 >\r
58 > I'm willing to accept that only the last log message will make it out to\r
59 > the caller, and i could track whether anything has been written to the\r
60 > log and change the return value in that case.  would that be acceptable?\r
61 >\r
62 \r
63 That sounds like an improvement. Other options I can think of\r
64 \r
65       - accumulate an error string. With talloc_asprintf_append, this is\r
66       not _too_ terrible. Making a second logging function [1] that\r
67       didn't clear the log buffer but appended would maybe make sense\r
68       (aside from contradicting what I said in the previous message).\r
69       This would still need some status return to alert the caller.\r
70 \r
71     - Pass a logging callback; this requires API changes.  We\r
72       already have a such a callback for notmuch_database_compact.\r
73       \r
74 \r
75 While thinking about this, I noticed several suspect uses of\r
76 _notmuch_database_log in current index.cc, at least in\r
77 _index_mime_part. These are probably my fault, resulting from \r
78 blindly replacing printfs.\r
79 \r
80 [1]: untested:\r
81 \r
82 void\r
83 _notmuch_database_log_append (notmuch_database_t *notmuch,\r
84                       const char *format,\r
85                       ...)\r
86 {\r
87     va_list va_args;\r
88 \r
89     va_start (va_args, format);\r
90 \r
91     if (notmuch->status_string)\r
92         notmuch->status_string = talloc_vasprintf_append (notmuch->status_string, format, va_args)\r
93     else\r
94         notmuch->status_string = talloc_vasprintf (notmuch, format, va_args);\r
95     \r
96     va_end (va_args);\r
97 }\r