Thanx (was: Re: notmuch should show Message-Id: -headers)
[notmuch-archives.git] / e6 / 62a9e3fa0f715cdb76f3fd599d2beac383988a
1 Return-Path: <eg@gaute.vetsj.com>\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 07952431FC2\r
6         for <notmuch@notmuchmail.org>; Sat, 17 Jan 2015 07:11:14 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 1.738\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.738 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7]\r
13         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 G5hGtFTheALN for <notmuch@notmuchmail.org>;\r
17         Sat, 17 Jan 2015 07:11:10 -0800 (PST)\r
18 Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com\r
19         [209.85.217.178]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 82288431FAF\r
22         for <notmuch@notmuchmail.org>; Sat, 17 Jan 2015 07:11:10 -0800 (PST)\r
23 Received: by mail-lb0-f178.google.com with SMTP id u14so22486330lbd.9\r
24         for <notmuch@notmuchmail.org>; Sat, 17 Jan 2015 07:11:09 -0800 (PST)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=1e100.net; s=20130820;\r
27         h=x-gm-message-state:date:from:subject:to:references:in-reply-to\r
28         :user-agent:message-id:mime-version:content-type\r
29         :content-transfer-encoding;\r
30         bh=DK+6mZO+/S86WYzsq0MAvJ4SphbYzqXWQVHz6n9iBCk=;\r
31         b=WIk3yRbQITq3ZPeU51DhXMDAif8598kkOMAKu/Ai58bugYb8yPBKuWCSw1LMfFW6xv\r
32         /MA3m8InGlkR/OwQNuhfwjR9wofF6g2nbaPcQadXUqEAsvYAOD02Ub9sal23g3E2Lai0\r
33         gko7xcCoBbElqfWwfukgLZJIG3zl3XW5cC7bH/zV3YsJYDG0Bx7noz4EHZKWz6tdagmx\r
34         Z/CE5T7Y8pF0tWqiZxr2dTRGumGxkeO2jU0wP2QFj7T1/D1xJ7/FBHx8NFu42Z5/rQL3\r
35         AeOwOnw8ZrJK7XglvwkcpSRBORypF6wQ9manuvKO1IWXi43r7Y78vL5k3akmAHuPa6n9\r
36         yZyQ==\r
37 X-Gm-Message-State:\r
38  ALoCoQlygMM8yAtHloUYekN7vapZzJdT7yzxJfK8yNpZChQ7m/l210xCUfltLO87GOoTfmOqu7nU\r
39 X-Received: by 10.152.26.201 with SMTP id n9mr21216383lag.50.1421507469122;\r
40         Sat, 17 Jan 2015 07:11:09 -0800 (PST)\r
41 Received: from localhost (c2774BF51.dhcp.as2116.net. [81.191.116.39])\r
42         by mx.google.com with ESMTPSA id y11sm815150lba.5.2015.01.17.07.11.06\r
43         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
44         Sat, 17 Jan 2015 07:11:07 -0800 (PST)\r
45 Date: Sat, 17 Jan 2015 15:12:05 +0000\r
46 From: Gaute Hope <eg@gaute.vetsj.com>\r
47 Subject: Re: DatabaseModifiedErrors causing troubles\r
48 To: David Bremner <david@tethera.net>, notmuch <notmuch@notmuchmail.org>\r
49 References:\r
50  <CABKe4MvEdcsq8BZ-vq6R0Vnw87zEgBvqW_2F-Wysf5GNchqweg@mail.gmail.com>\r
51         <87bnmkgr57.fsf@maritornes.cs.unb.ca>\r
52         <1421493070-astroid-1-4x8pflg7mc-1327@strange>\r
53         <87fvb9bnf8.fsf@maritornes.cs.unb.ca>\r
54 In-Reply-To: <87fvb9bnf8.fsf@maritornes.cs.unb.ca>\r
55 User-Agent: astroid/vv0.1-42-ge9d4344b (https://github.com/gauteh/astroid)\r
56 Message-Id: <1421507092-astroid-4-sde37j1ij5-1327@strange>\r
57 MIME-Version: 1.0\r
58 Content-Type: text/plain; charset=utf-8; format=flowed\r
59 Content-Transfer-Encoding: quoted-printable\r
60 X-BeenThere: notmuch@notmuchmail.org\r
61 X-Mailman-Version: 2.1.13\r
62 Precedence: list\r
63 List-Id: "Use and development of the notmuch mail system."\r
64         <notmuch.notmuchmail.org>\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
68 List-Post: <mailto:notmuch@notmuchmail.org>\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
72 X-List-Received-Date: Sat, 17 Jan 2015 15:11:14 -0000\r
73 \r
74 Excerpts from David Bremner's message of January 17, 2015 13:29:\r
75 > Gaute Hope <eg@gaute.vetsj.com> writes:\r
76 >\r
77 >>\r
78 >> Hi David,\r
79 >>\r
80 >> Would it be possible with an error code that I could compare against in\r
81 >> stead? It would then work a bit like a global instance of the gmime\r
82 >> error. It could even be a preparation step against a gmime-error-style\r
83 >> solution in the far future.\r
84 >>\r
85 >> I am sure you know all the bad reasons for using a strcmp with strings\r
86 >> such as small (subtle) changes making them useless or future\r
87 >> localization of notmuch. This solution is in my opinion worse than the\r
88 >> current situation, it will lock things in and create problems for future\r
89 >> API compatability and application maintainers. I would rather wait for\r
90 >> or spend some time on a more general solution.\r
91 >\r
92 > I don't agree it's worse than the current situation but I take your\r
93 > point it isn't ideal.  We could do some kind "errno" in the database\r
94 > structure.  I think there are not that many functions with this\r
95 > unhelpful error return type. Based on a scan of notmuch.h, I see\r
96 >\r
97 > notmuch_query_search_threads\r
98 > notmuch_query_search_messages\r
99 >\r
100 > and the two count functions that I already posted API breaking patches\r
101 > for.  It might be better just to update the API (either adding versions\r
102 > with error returns, or just forcing people to change) for these\r
103 > functions.  Otherwise we have two different ways of returning status\r
104 > codes, and the "errno" is only used some of the time.\r
105 \r
106 Yeah - a consistent way of doing this would in my opinion be very\r
107 useful. Also, many other functions could be affected by outside\r
108 processes as well (notmuch new, notmuch tag) that do not necessarily\r
109 violate the thread-safety restrictions on xapian / notmuch. Errors in\r
110 these functions, and importantly which error, are currently hard to\r
111 catch and identify (say notmuch_messages_move_to_next). The same error\r
112 reporting system could be used for these. With a flexible error system\r
113 we could fix these as they are discovered.\r
114 \r
115 Cheers, Gaute\r
116 \r
117 =\r