From 270210be623631669034c12b3f672eda25d1eaec Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 1 Oct 2017 15:53:57 +0100 Subject: interpret exclude_tags this adds exclude tags to every query object. Just as in notmuch (option search.exclude_tags), this will essentially render messages invisible if tagged with one of those tags, unless they explicitly appear in the query. See also man notmuch-config(1). closes #732 --- alot/db/manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'alot/db') diff --git a/alot/db/manager.py b/alot/db/manager.py index dfd681d0..93a38b81 100644 --- a/alot/db/manager.py +++ b/alot/db/manager.py @@ -403,7 +403,11 @@ class DBManager(object): """ mode = Database.MODE.READ_ONLY db = Database(path=self.path, mode=mode) - return db.create_query(querystring) + q = db.create_query(querystring) + # add configured exclude tags + for tag in settings.get('exclude_tags'): + q.exclude_tag(tag) + return q def add_message(self, path, tags=None, afterwards=None): """ -- cgit v1.2.3