Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / f5 / c026175fa678c3984c8a67028653974d34015e
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 353BF431FD9\r
6         for <notmuch@notmuchmail.org>; Sat, 17 Jan 2015 03:17:50 -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 0BvgIaEH7DcM for <notmuch@notmuchmail.org>;\r
17         Sat, 17 Jan 2015 03:17:46 -0800 (PST)\r
18 Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com\r
19         [209.85.217.170]) (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 84344431FAF\r
22         for <notmuch@notmuchmail.org>; Sat, 17 Jan 2015 03:17:46 -0800 (PST)\r
23 Received: by mail-lb0-f170.google.com with SMTP id 10so22084944lbg.1\r
24         for <notmuch@notmuchmail.org>; Sat, 17 Jan 2015 03:17:45 -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=/cpM2H3vRNph4jheM83SzNpW9w/f6olBC86vtSM5IBU=;\r
31         b=KaGsKHon/rBj0zS1OxUAwuzuLz01Q5bCvErFKfu0EiW6qK59NGa1frlBN/P6cQQI9w\r
32         W0ws0zH9AtA6gQRNuQxz4loTAm2mxx7MiqNiUYKL4LwSXEUVSSLph/QrNa1q5YVfaPaE\r
33         naGRywQhwuKoknDD6mb2AZLpANO+tmD7eqF31tiH72747QYCo7nKR+bibt0wWG4CX/VC\r
34         /BSeA1cabkVt5Vk7s+F2wW8fVqlnUGwijMdJmjIINeP8F4qIfU/xTaqOHenErA1+zo9f\r
35         nZTilvfp7CbN31rFRYGrsPa5xoUrQ1ESSYs59TTWRMWnmyx5vJupG688NEtH0caijdu8\r
36         zkcw==\r
37 X-Gm-Message-State:\r
38  ALoCoQnWdwmY5iVUz0sQAWF7n96OsaoK86VQMrpXsSreuJaMROQZu+oVahEZLFR5DVq3euugJkYP\r
39 X-Received: by 10.112.172.194 with SMTP id be2mr20531561lbc.53.1421493465077; \r
40         Sat, 17 Jan 2015 03:17:45 -0800 (PST)\r
41 Received: from localhost (c2774BF51.dhcp.as2116.net. [81.191.116.39])\r
42         by mx.google.com with ESMTPSA id p10sm2065524lap.10.2015.01.17.03.17.43\r
43         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
44         Sat, 17 Jan 2015 03:17:44 -0800 (PST)\r
45 Date: Sat, 17 Jan 2015 11:18:43 +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 In-Reply-To: <87bnmkgr57.fsf@maritornes.cs.unb.ca>\r
53 User-Agent: astroid/vv0.1-42-ge9d4344b (https://github.com/gauteh/astroid)\r
54 Message-Id: <1421493070-astroid-1-4x8pflg7mc-1327@strange>\r
55 MIME-Version: 1.0\r
56 Content-Type: text/plain; charset=utf-8; format=flowed\r
57 Content-Transfer-Encoding: quoted-printable\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: Sat, 17 Jan 2015 11:17:50 -0000\r
71 \r
72 Excerpts from David Bremner's message of December 31, 2014 9:28:\r
73 > Gaute Hope <eg@gaute.vetsj.com> writes:\r
74 >=20\r
75 >> I can work around this by checking for a NULL pointer returned from\r
76 >> notmuch_query_search_threads () and re-open the database\r
77 >> (notmuch_database_close () -> notmuch_database_open ()). But I have no\r
78 >> way of knowing programatically if this really is the error that has\r
79 >> happened. There should be some way of propagating the error\r
80 >> information or (even better for my case; for notmuch to reopen the\r
81 >> database), one option is the Gmime way of passing an pointer to an\r
82 >> error structure that is filled up by the notmuch interface function.\r
83 >=20\r
84 > Hi Gaute;\r
85 >=20\r
86 > Sorry this sequence of postings of yours kindof fell down a well. In\r
87 > general there seems to be not very much enthusiasm for the GError\r
88 > solution.  We can do something less fancy with the series at\r
89 >=20\r
90 >            id:1419788030-10567-2-git-send-email-david@tethera.net\r
91 >=20\r
92 > In particular id:1419788030-10567-6-git-send-email-david@tethera.net\r
93 > replaces the printfs with saving to a status string accessible from\r
94 > notmuch_database_t.\r
95 \r
96 Hi David,\r
97 \r
98 Would it be possible with an error code that I could compare against in\r
99 stead? It would then work a bit like a global instance of the gmime\r
100 error. It could even be a preparation step against a gmime-error-style\r
101 solution in the far future.\r
102 \r
103 I am sure you know all the bad reasons for using a strcmp with strings\r
104 such as small (subtle) changes making them useless or future\r
105 localization of notmuch. This solution is in my opinion worse than the\r
106 current situation, it will lock things in and create problems for future\r
107 API compatability and application maintainers. I would rather wait for\r
108 or spend some time on a more general solution.\r
109 \r
110 Best regards, Gaute\r
111 \r
112 > I _think_ this could solve your problem, although doing strcmp on error\r
113 > message might not be ideal. Overall this is much less api breakage\r
114 > (only open and create need to be wrapped).\r
115 >=20\r
116 > We could also consider really updating the api for those NULL returning\r
117 > functions, but it seems less bad to me than the count functions updated\r
118 > in this series\r
119 >=20\r
120 >    id:1419971380-10307-2-git-send-email-david@tethera.net\r
121 >=20\r
122 > Let me know what you think,\r
123 >=20\r
124 > David\r
125 >=20\r
126 =\r