From: Jed Brown <jed@59A2.org>
To: notmuch@notmuchmail.org
Subject: [RFC] Precedence of OR and AND
Date: Sun, 22 Nov 2009 22:26:31 +0100 [thread overview]
Message-ID: <87y6ly45fc.fsf@59A2.org> (raw)
Currently OR binds more weakly than AND, which is natural in most
contexts, but I think it is rarely desirably for this sort of search.
Suppose I am in looking at my inbox and decide to filter by
term1 OR term2
Notmuch makes the query
tag:inbox AND term1 OR term2
which is actually
(tag:inbox AND term1) OR term2
and not at all what I wanted. Adding the necessary parentheses to
notmuch-search-filter is trivial but it requires more parentheses for
the overwhelming majority of searches that I think are more common.
Are most searches indeed closer to conjunctive form?
Should OR bind tighter than AND?
Jed
next reply other threads:[~2009-11-22 21:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-22 21:26 Jed Brown [this message]
2009-11-22 21:36 ` [RFC] Precedence of OR and AND Bart Trojanowski
2009-11-22 21:43 ` Jed Brown
2009-11-22 21:47 ` Bart Trojanowski
2009-11-23 4:39 ` Carl Worth
2009-11-23 11:49 ` [PATCH] Make search filters handle disjunctive queries Jed Brown
2009-11-23 18:07 ` Jed Brown
2009-11-23 18:26 ` Keith Packard
2009-11-23 18:48 ` Jed Brown
2009-12-02 2:56 ` Carl Worth
2009-12-02 10:59 ` Jed Brown
2009-12-02 11:00 ` Jed Brown
2009-12-04 19:13 ` Carl Worth
2009-12-02 13:18 ` Jan Janak
2009-12-02 13:46 ` Jed Brown
2009-12-02 14:38 ` Jan Janak
2009-12-02 14:52 ` Jed Brown
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=87y6ly45fc.fsf@59A2.org \
--to=jed@59a2.org \
--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).