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