mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
Allow lone "not" search operators
As suggested by Keith in FLAG_PURE_NOT allows for expressions like: notmuch search NOT tag:inbox Note that this way a search like: notmuch search foobar NOT tag:inbox should not be written instead: notmuch search foobar AND NOT tag:inbox In my opinion, the latter feels more natural and is somewhat more explicit. It gives a better clue of what the search is about instead of assuming that an implicit AND operator is there.
This commit is contained in:
parent
b6c4978fda
commit
e5da2b701f
1 changed files with 2 additions and 1 deletions
|
@ -97,7 +97,8 @@ notmuch_query_search_messages (notmuch_query_t *query,
|
|||
Xapian::QueryParser::FLAG_PHRASE |
|
||||
Xapian::QueryParser::FLAG_LOVEHATE |
|
||||
Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE |
|
||||
Xapian::QueryParser::FLAG_WILDCARD);
|
||||
Xapian::QueryParser::FLAG_WILDCARD |
|
||||
Xapian::QueryParser::FLAG_PURE_NOT);
|
||||
|
||||
if (strcmp (query_string, "") == 0) {
|
||||
final_query = mail_query;
|
||||
|
|
Loading…
Reference in a new issue