diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2017-10-01 15:53:57 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2017-10-01 15:53:57 +0100 |
commit | 270210be623631669034c12b3f672eda25d1eaec (patch) | |
tree | 1e9ef18147991acf9dae839b9a0321172fc0fde4 /alot/db/manager.py | |
parent | acfea5762713113d2c7e984dba8242daf53639a6 (diff) |
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
Diffstat (limited to 'alot/db/manager.py')
-rw-r--r-- | alot/db/manager.py | 6 |
1 files changed, 5 insertions, 1 deletions
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): """ |