diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-05-07 16:02:24 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-05-08 17:16:18 +0200 |
commit | 63714d4d203570c636ce9253d7a0e10131da16a9 (patch) | |
tree | 80f8098628a5231ed2521b783869da54587c4ae9 /alot/db/manager.py | |
parent | b244c2ff1856abe602e3553b376208f8dfbdce5c (diff) |
db/manager: drop support for adding/removing queries
This is not implemented in notmuch2 and does not really belong in alot.
It can be done better through the notmuch utility.
Diffstat (limited to 'alot/db/manager.py')
-rw-r--r-- | alot/db/manager.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/alot/db/manager.py b/alot/db/manager.py index 3c3ce7d6..806982b5 100644 --- a/alot/db/manager.py +++ b/alot/db/manager.py @@ -154,10 +154,6 @@ class DBManager: msg.thaw() logging.debug('thaw') - elif cmd == 'setconfig': - key = current_item[2] - value = current_item[3] - db.set_config(key, value) else: # tag/set/untag querystring, tags = current_item[2:] @@ -431,36 +427,3 @@ class DBManager: raise DatabaseError(msg) else: self.writequeue.append(('add', afterwards, path, tags)) - - def save_named_query(self, alias, querystring, afterwards=None): - """ - add an alias for a query string. - - These are stored in the notmuch database and can be used as part of - more complex queries using the syntax "query:alias". - See :manpage:`notmuch-search-terms(7)` for more info. - - :param alias: name of shortcut - :type alias: str - :param querystring: value, i.e., the full query string - :type querystring: str - :param afterwards: callback to trigger after adding the alias - :type afterwards: callable or None - """ - if self.ro: - raise DatabaseROError() - self.writequeue.append(('setconfig', afterwards, 'query.' + alias, - querystring)) - - def remove_named_query(self, alias, afterwards=None): - """ - remove a named query from the notmuch database. - - :param alias: name of shortcut - :type alias: str - :param afterwards: callback to trigger after adding the alias - :type afterwards: callable or None - """ - if self.ro: - raise DatabaseROError() - self.writequeue.append(('setconfig', afterwards, 'query.' + alias, '')) |