aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--worker/notmuch/lib/database.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/worker/notmuch/lib/database.go b/worker/notmuch/lib/database.go
index 2915605d..b4643a56 100644
--- a/worker/notmuch/lib/database.go
+++ b/worker/notmuch/lib/database.go
@@ -68,7 +68,9 @@ func (db *DB) newQuery(query string) (*notmuch.Query, error) {
q.Sort(notmuch.SORT_OLDEST_FIRST)
for _, t := range db.excludedTags {
err := q.ExcludeTag(t)
- if err != nil {
+ // do not treat STATUS_IGNORED as an error; this allows explicit
+ // searches using tags that are excluded by default
+ if err != nil && !errors.Is(err, notmuch.STATUS_IGNORED) {
return nil, err
}
}