aboutsummaryrefslogtreecommitdiff
path: root/vim/notmuch.vim
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-04-27 20:34:06 -0300
committerDavid Bremner <david@tethera.net>2021-04-27 20:34:53 -0300
commitb34bc7c7895814da33a6df2f056ec32bc18e59ae (patch)
treed3f5376d1ce398f90639c97c5380ada629b39896 /vim/notmuch.vim
parent0998fa9a09387b622d770fc8c5f780a951b0cf2a (diff)
Revert "Vim: Ensure that every queries respect excluded tags"
This reverts commit 0998fa9a09387b622d770fc8c5f780a951b0cf2a. per id:CAMP44s2k+fthVXCS9R9kQRzzwWbnS7RAcKg1Q0m6q5Ybzdm71Q@mail.gmail.com
Diffstat (limited to 'vim/notmuch.vim')
-rw-r--r--vim/notmuch.vim12
1 files changed, 9 insertions, 3 deletions
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 8e547d4e..c1c2f63d 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -317,6 +317,9 @@ ruby << EOF
$curbuf.render do |b|
q = $curbuf.query(get_cur_view)
q.sort = Notmuch::SORT_OLDEST_FIRST
+ $exclude_tags.each { |t|
+ q.add_tag_exclude(t)
+ }
msgs = q.search_messages
msgs.each do |msg|
m = Mail.read(msg.filename)
@@ -640,6 +643,9 @@ ruby << EOF
$searches.clear
folders.each do |name, search|
q = $curbuf.query(search)
+ $exclude_tags.each { |t|
+ q.add_tag_exclude(t)
+ }
$searches << search
count = count_threads ? q.count_threads : q.count_messages
b << "%9d %-20s (%s)" % [count, name, search]
@@ -651,6 +657,9 @@ ruby << EOF
date_fmt = VIM::evaluate('g:notmuch_date_format')
q = $curbuf.query(search)
q.sort = Notmuch::SORT_NEWEST_FIRST
+ $exclude_tags.each { |t|
+ q.add_tag_exclude(t)
+ }
$threads.clear
t = q.search_threads
@@ -702,9 +711,6 @@ ruby << EOF
def query(*args)
q = @db.query(*args)
@queries << q
- $exclude_tags.each { |t|
- q.add_tag_exclude(t)
- }
q
end