[notmuch] [RFC] Precedence of OR and AND

2009-11-23 Thread Carl Worth
On Sun, 22 Nov 2009 22:43:30 +0100, Jed Brown wrote: > On Sun, 22 Nov 2009 16:36:49 -0500, Bart Trojanowski > wrote: > Absolutely, and I have this applied locally to notmuch.el, Patch please? >but I didn't > fix notmuch-search-filter-

[notmuch] [RFC] Precedence of OR and AND

2009-11-22 Thread Jed Brown
On Sun, 22 Nov 2009 16:36:49 -0500, Bart Trojanowski wrote: > Wouldn't this problem be solved by each filter appending a bracketed > version of your filter? > > You start with tag:inbox and you filter on "term1 or term2" you'd get: > > tag:inbox and (term1 or term2) Absolutely, and I ha

[notmuch] [RFC] Precedence of OR and AND

2009-11-22 Thread Jed Brown
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:i

[notmuch] [RFC] Precedence of OR and AND

2009-11-22 Thread Bart Trojanowski
* Jed Brown [091122 16:43]: > Absolutely, and I have this applied locally to notmuch.el, but I didn't > fix notmuch-search-filter-by-tag because that would really need to parse > the expression. I'm just asking if anyone else thinks binding OR > tighter than AND would be desirable. Maybe some of

[notmuch] [RFC] Precedence of OR and AND

2009-11-22 Thread Bart Trojanowski
Wouldn't this problem be solved by each filter appending a bracketed version of your filter? You start with tag:inbox and you filter on "term1 or term2" you'd get: tag:inbox and (term1 or term2) Doing it again would result in... tag:inbox and (term1 or term2) and (term3 or term4