From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [Patch v3 10/11] lib: make a global constant for query parser flags
Date: Sat, 07 May 2016 20:59:15 +0300 [thread overview]
Message-ID: <m2twi9eolo.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <1462065879-29860-11-git-send-email-david@tethera.net>
On Sun, May 01 2016, David Bremner <david@tethera.net> 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
next prev parent reply other threads:[~2016-05-07 17:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-01 1:24 v3 of libconfig / single argument date / named query patches David Bremner
2016-05-01 1:24 ` [Patch v3 01/11] configure: detect Xapian:FieldProcessor David Bremner
2016-05-01 1:24 ` [Patch v3 02/11] lib: optionally support single argument date: queries David Bremner
2016-05-01 1:24 ` [Patch v3 03/11] lib/cli: add library API / CLI for compile time options David Bremner
2016-05-07 16:02 ` Tomi Ollila
2016-05-01 1:24 ` [Patch v3 04/11] configure: check directly for xapian compaction API David Bremner
2016-05-01 1:24 ` [Patch v3 05/11] lib: provide config API David Bremner
2016-05-07 17:03 ` Tomi Ollila
2016-05-01 1:24 ` [Patch v3 06/11] lib: config list iterators David Bremner
2016-05-01 1:24 ` [Patch v3 07/11] CLI: add optional config data to dump output David Bremner
2016-05-07 17:37 ` Tomi Ollila
2016-05-07 20:29 ` David Bremner
2016-05-01 1:24 ` [Patch v3 08/11] CLI: optionally restore config data David Bremner
2016-05-01 1:24 ` [Patch v3 09/11] CLI: add notmuch-config support for named queries David Bremner
2016-05-01 1:24 ` [Patch v3 10/11] lib: make a global constant for query parser flags David Bremner
2016-05-07 17:59 ` Tomi Ollila [this message]
2016-05-01 1:24 ` [Patch v3 11/11] lib: add support for named queries David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2twi9eolo.fsf@guru.guru-group.fi \
--to=tomi.ollila@iki.fi \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).