unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [RFC] Precedence of OR and AND
@ 2009-11-22 21:26 Jed Brown
  2009-11-22 21:36 ` Bart Trojanowski
  0 siblings, 1 reply; 17+ messages in thread
From: Jed Brown @ 2009-11-22 21:26 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-12-04 19:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-22 21:26 [RFC] Precedence of OR and AND Jed Brown
2009-11-22 21:36 ` 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

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).