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 CC126431FB6
\r
6 for <notmuch@notmuchmail.org>; Sun, 5 Oct 2014 23:19:27 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 cRugj8BNvxic for <notmuch@notmuchmail.org>;
\r
16 Sun, 5 Oct 2014 23:19:20 -0700 (PDT)
\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])
\r
18 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id C4BC0431FAE
\r
21 for <notmuch@notmuchmail.org>; Sun, 5 Oct 2014 23:19:20 -0700 (PDT)
\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)
\r
23 (envelope-from <david@tethera.net>)
\r
24 id 1Xb1dg-0004LZ-5i; Mon, 06 Oct 2014 03:19:20 -0300
\r
25 Received: (nullmailer pid 18837 invoked by uid 1000); Mon, 06 Oct 2014
\r
27 From: David Bremner <david@tethera.net>
\r
28 To: Austin Clements <aclements@csail.mit.edu>
\r
29 Subject: Re: [PATCH 06/11] lib: Internal support for querying and creating
\r
31 In-Reply-To: <20141005232400.GC7970@csail.mit.edu>
\r
32 References: <1412345958-8278-1-git-send-email-aclements@csail.mit.edu>
\r
33 <1412345958-8278-7-git-send-email-aclements@csail.mit.edu>
\r
34 <87fvf2q5p5.fsf@maritornes.cs.unb.ca>
\r
35 <20141005232400.GC7970@csail.mit.edu>
\r
36 User-Agent: Notmuch/0.18.1+98~gae27403 (http://notmuchmail.org) Emacs/24.3.1
\r
37 (x86_64-pc-linux-gnu)
\r
38 Date: Mon, 06 Oct 2014 08:19:10 +0200
\r
39 Message-ID: <87y4stoh41.fsf@maritornes.cs.unb.ca>
\r
41 Content-Type: text/plain
\r
42 Cc: notmuch@notmuchmail.org
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Mon, 06 Oct 2014 06:19:27 -0000
\r
57 Austin Clements <aclements@csail.mit.edu> writes:
\r
60 > I'm used to reading this stuff, so either way is fine with me. Do we
\r
61 > have bit set / clear / read macros?
\r
64 I guess not. the things we have in query.cc are related but different.
\r
66 >> > + else if (*i == "Tghost")
\r
67 >> > + message->flags |= (1 << NOTMUCH_MESSAGE_FLAG_GHOST);
\r
70 >> It makes me faintly unhappy to have the prefix hardcoded here.
\r
71 >> Not sure if there is a sensible solution.
\r
73 > I agree, but I also don't want to construct the test string every time
\r
74 > or deconstruct the term string every time. I could move the "T"
\r
75 > prefix string to a #define and use that both here and in
\r
76 > BOOLEAN_PREFIX_INTERNAL, but that solution may be worse than the
\r
77 > problem. What do you think?
\r
79 Maybe just a comment to point to BOOLEAN_PREFIX_INTERNAL.
\r
81 Or maybe define a macro right beside BOOLEAN_PREFIX_INTERNAL like
\r
83 #define ADD_TYPE_PREFIX(s) "T" s
\r
85 At least then the duplication is all in one place.
\r