Re: [Patch v3 10/11] lib: make a global constant for query parser flags
authorTomi Ollila <tomi.ollila@iki.fi>
Sat, 7 May 2016 17:59:15 +0000 (20:59 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:21:46 +0000 (16:21 -0700)
bd/6de9e2e95ce78ecd45fe54536ec9d47b2b7279 [new file with mode: 0644]

diff --git a/bd/6de9e2e95ce78ecd45fe54536ec9d47b2b7279 b/bd/6de9e2e95ce78ecd45fe54536ec9d47b2b7279
new file mode 100644 (file)
index 0000000..ed975f9
--- /dev/null
@@ -0,0 +1,106 @@
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id A16E56DE0217\r
+ for <notmuch@notmuchmail.org>; Sat,  7 May 2016 10:59:25 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.599\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.599 tagged_above=-999 required=5 tests=[AWL=-0.053,\r
+  SPF_NEUTRAL=0.652] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id J0k4efExWTRK for <notmuch@notmuchmail.org>;\r
+ Sat,  7 May 2016 10:59:17 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 3729D6DE00EB\r
+ for <notmuch@notmuchmail.org>; Sat,  7 May 2016 10:59:17 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id DFA7E100063;\r
+ Sat,  7 May 2016 20:59:15 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: [Patch v3 10/11] lib: make a global constant for query parser\r
+ flags\r
+In-Reply-To: <1462065879-29860-11-git-send-email-david@tethera.net>\r
+References: <1462065879-29860-1-git-send-email-david@tethera.net>\r
+ <1462065879-29860-11-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.22+9~gb26b5ad (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sat, 07 May 2016 20:59:15 +0300\r
+Message-ID: <m2twi9eolo.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 07 May 2016 17:59:25 -0000\r
+\r
+On Sun, May 01 2016, David Bremner <david@tethera.net> wrote:\r
+\r
+> It's already kindof gross that this is hardcoded in two different\r
+> places. We will also need these later in field processors calling back\r
+> into the query parser.\r
+> ---\r
+>  lib/database-private.h |  4 ++++\r
+>  lib/query.cc           | 16 ++--------------\r
+>  2 files changed, 6 insertions(+), 14 deletions(-)\r
+>\r
+> diff --git a/lib/database-private.h b/lib/database-private.h\r
+> index e1962f4..b5c1f90 100644\r
+> --- a/lib/database-private.h\r
+> +++ b/lib/database-private.h\r
+> @@ -144,6 +144,10 @@ operator&=(_notmuch_features &a, _notmuch_features b)\r
+>      return a;\r
+>  }\r
+>  \r
+> +#define NOTMUCH_QUERY_PARSER_FLAGS (Xapian::QueryParser::FLAG_BOOLEAN | Xapian::QueryParser::FLAG_PHRASE | \\r
+> +                                Xapian::QueryParser::FLAG_LOVEHATE | Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE | \\r
+> +                                Xapian::QueryParser::FLAG_WILDCARD | Xapian::QueryParser::FLAG_PURE_NOT)\r
+\r
+#define NOTMUCH_QUERY_PARSER_FLAGS (Xapian::QueryParser::FLAG_BOOLEAN | \\r
+                                   Xapian::QueryParser::FLAG_PHRASE | \\r
+                                   Xapian::QueryParser::FLAG_LOVEHATE | \\r
+                                   Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE | \\r
+                                   Xapian::QueryParser::FLAG_WILDCARD | \\r
+                                   Xapian::QueryParser::FLAG_PURE_NOT)\r
+\r
+Instead, one line goes up to column 82, but..\r
+\r
+No other nits in this file.\r
+\r
+Some previous ones had more of spacing around = and\r
+opening brace in the same line as function definition.\r
+\r
+There were also more notmuch_options_sanitize () calls (I wonder how did\r
+your tests pass before you sent this series :O)\r
+\r
+The next one, id:1462065879-29860-12-git-send-email-david@tethera.net\r
+has inconsistent spacing:\r
+\r
+       $(dir)/query.cc         \\r
++      $(dir)/query-fp.cc \\r
+       $(dir)/config.cc        \\r
+\r
+\r
+Other than these I don't have more comments on the implementation (I may\r
+have not look deep enough, remembering all these nits disturbs me ;). I have\r
+not tested these (as CXXLAGS do not apply >;) and I will not run configure\r
+w/o set -u anymore :D)\r
+\r
+\r
+Tomi\r