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 olra.theworths.org (Postfix) with ESMTP id EE1A2431FB6
\r
6 for <notmuch@notmuchmail.org>; Fri, 3 May 2013 17:54:45 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id hDTuBELEsqJV for <notmuch@notmuchmail.org>;
\r
16 Fri, 3 May 2013 17:54:41 -0700 (PDT)
\r
17 Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id DDE4A431FAF
\r
21 for <notmuch@notmuchmail.org>; Fri, 3 May 2013 17:54:40 -0700 (PDT)
\r
22 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])
\r
23 by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id r440se3Y032767;
\r
24 Fri, 3 May 2013 21:54:40 -0300
\r
25 Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net
\r
26 ([156.34.82.78] helo=zancas.localnet)
\r
27 by tesseract.cs.unb.ca with esmtpsa
\r
28 (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80)
\r
29 (envelope-from <david@tethera.net>)
\r
30 id 1UYQkF-0005UT-Hg; Fri, 03 May 2013 21:54:39 -0300
\r
31 Received: from bremner by zancas.localnet with local (Exim 4.80)
\r
32 (envelope-from <david@tethera.net>)
\r
33 id 1UYQk9-0005K7-Uk; Fri, 03 May 2013 21:54:29 -0300
\r
34 From: David Bremner <david@tethera.net>
\r
35 To: "Alexey I. Froloff" <raorn@raorn.name>
\r
36 Subject: Re: [PATCH] lib: Add a new prefix "list" to the search-terms syntax
\r
37 In-Reply-To: <20130430095213.GA2861@raorn.name>
\r
38 References: <20130409083010.GA27675@raorn.name>
\r
39 <1365549369-12776-1-git-send-email-raorn@raorn.name>
\r
40 <87vc74vn2n.fsf@zancas.localnet> <20130430095213.GA2861@raorn.name>
\r
41 User-Agent: Notmuch/0.15.2+84~g12d5e4e (http://notmuchmail.org) Emacs/24.2.1
\r
42 (x86_64-pc-linux-gnu)
\r
43 Date: Fri, 03 May 2013 21:54:29 -0300
\r
44 Message-ID: <871u9nva2i.fsf@zancas.localnet>
\r
46 Content-Type: text/plain
\r
48 Cc: notmuch@notmuchmail.org
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Sat, 04 May 2013 00:54:46 -0000
\r
63 "Alexey I. Froloff" <raorn@raorn.name> writes:
\r
66 >> > + void *local = talloc_new (message);
\r
67 >> we should handle ENOMEM here, I think.
\r
68 > There are 16 talloc_new() calls and ENOMEM is not handled
\r
71 This makes me a bit sad but I agree it's not your fault ;).
\r
73 >> > + /* _notmuch_message_add_term() may return
\r
74 >> > + * NOTMUCH_PRIVATE_STATUS_TERM_TOO_LONG here. We can't fix it, but
\r
75 >> > + * this is not a reason to exit with error... */
\r
76 >> > + if (_notmuch_message_add_term (message, "list", list_id))
\r
77 >> > + fprintf (stderr, "Warning: Not indexing List-Id: <%s>\n", list_id);
\r
78 >> This should say why the indexing failed.
\r
79 > There should be strerror-like function, then can give description
\r
80 > for a given status code.
\r
82 There is, but only for the public status values.
\r
84 I guess the most correct thing would be to check for equality with
\r
85 NOTMUCH_PRIVATE_STATUS_TERM_TOO_LONG, print an appropriate error message
\r
86 if so, and otherwise use
\r
87 notmuch_status_to_string(COERCE_STATUS(private_status))
\r