summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d241a48)
Exclude mails tagged with any tag specified in 'notmuch config get
search.exclude_tags' in folders list and search list.
$db_name = nil
$email = $email_name = $email_address = nil
$db_name = nil
$email = $email_name = $email_address = nil
$searches = []
$threads = []
$messages = []
$searches = []
$threads = []
$messages = []
$email_address = get_config_item('user.primary_email')
$email_name = get_config_item('user.name')
$email = "%s <%s>" % [$email_name, $email_address]
$email_address = get_config_item('user.primary_email')
$email_name = get_config_item('user.name')
$email = "%s <%s>" % [$email_name, $email_address]
+ ignore_tags = get_config_item('search.exclude_tags')
+ $exclude_tags = ignore_tags.split("\n")
$searches.clear
folders.each do |name, search|
q = $curbuf.query(search)
$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.search_threads.count : q.search_messages.count
b << "%9d %-20s (%s)" % [count, name, search]
$searches << search
count = count_threads ? q.search_threads.count : q.search_messages.count
b << "%9d %-20s (%s)" % [count, name, search]
date_fmt = VIM::evaluate('g:notmuch_date_format')
q = $curbuf.query(search)
q.sort = Notmuch::SORT_NEWEST_FIRST
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
$threads.clear
t = q.search_threads