Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / 6e / 990a29268e0b44bd62c8dd75efb5dd3cf4c6ba
1 Return-Path: <m.walters@qmul.ac.uk>\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 466F2431FAF\r
6         for <notmuch@notmuchmail.org>; Tue, 10 Sep 2013 01:06:16 -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: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id qXebqebHUenb for <notmuch@notmuchmail.org>;\r
17         Tue, 10 Sep 2013 01:06:10 -0700 (PDT)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 02190431FAE\r
22         for <notmuch@notmuchmail.org>; Tue, 10 Sep 2013 01:06:09 -0700 (PDT)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1VJIxV-0004vI-LT; Tue, 10 Sep 2013 09:06:02 +0100\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
28         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
29         (envelope-from <m.walters@qmul.ac.uk>)\r
30         id 1VJIxV-0002eL-Bq; Tue, 10 Sep 2013 09:06:01 +0100\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: Peter Wang <novalazy@gmail.com>\r
33 Subject: Re: [PATCH 1/3] cli: add insert --must-index option\r
34 In-Reply-To: <20130727151510.GA13750@hili.localdomain>\r
35 References: <1374365254-13227-1-git-send-email-novalazy@gmail.com>\r
36         <87ip048gbj.fsf@qmul.ac.uk>\r
37         <20130727151510.GA13750@hili.localdomain>\r
38 User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/23.4.1\r
39         (x86_64-pc-linux-gnu)\r
40 Date: Tue, 10 Sep 2013 09:06:00 +0100\r
41 Message-ID: <87hadtxfrr.fsf@qmul.ac.uk>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain; charset=us-ascii\r
44 X-Sender-Host-Address: 93.97.24.31\r
45 X-QM-SPAM-Info: Sender has good ham record.  :)\r
46 X-QM-Body-MD5: ae989e6c2e9253499f409b45db0e9ed2 (of first 20000 bytes)\r
47 X-SpamAssassin-Score: 0.0\r
48 X-SpamAssassin-SpamBar: /\r
49 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
50         determine if it is\r
51         spam. We require at least 5.0 points to mark a message as spam.\r
52         This message scored 0.0 points. Summary of the scoring: \r
53         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
54         provider *      (markwalters1009[at]gmail.com)\r
55         *  0.0 AWL AWL: From: address is in the auto white-list\r
56 X-QM-Scan-Virus: ClamAV says the message is clean\r
57 Cc: notmuch@notmuchmail.org\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Tue, 10 Sep 2013 08:06:16 -0000\r
71 \r
72 \r
73 Hi\r
74 \r
75 >> Do you have a particular use case where indexing is required but tagging\r
76 >> is not? For my uses I would prefer failing if either indexing or tagging\r
77 >> failed. (My use being postponing messages; If they don't get the\r
78 >> postponed tag they could be hard to find)\r
79 >\r
80 > You're right.\r
81 >\r
82 > What about a failure to sync tags to maildir flags?\r
83 \r
84 Personally, I wouldn't mind ignoring this failure: it should be\r
85 relatively easy to fix after the fact (but others may disagree).\r
86 \r
87 > I now noticed that database modifications aren't flushed until the\r
88 > notmuch_database_destroy call (right?), which has no return value and\r
89 > failure of which is silently ignored.  That's acceptable in the default\r
90 > mode, but with --must-index the failure should be reported (and the\r
91 > file deleted).\r
92 \r
93 Yes I think you are right: flushed by notmuch_database_close which is\r
94 called by notmuch_database_destroy.\r
95 \r
96 Perhaps the easiest would be to add a notmuch_database_flush with a\r
97 return value and then you can call that (and then call\r
98 notmuch_database_destroy)? \r
99 \r
100 Alternatively maybe add notmuch_database_destroy_with_flush or something\r
101 which does give a return value. notmuch_database_close is only called 3\r
102 times and notmuch_database_destroy lots of times so changing close is\r
103 much less intrusive than changing destroy. But I don't know whether we\r
104 would break any  bindings or external programs etc.\r
105 \r
106 What do you think?\r
107 \r
108 Best wishes\r
109 \r
110 Mark\r