From: Franz Fellner <alpine.art.de@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH v2] VIM: Exclude mails tagged with any tag specified in 'notmuch config get search.exclude_tags' in folders list and search list.
Date: Thu, 22 Jan 2015 13:52:47 +0100 [thread overview]
Message-ID: <1421931167-22066-1-git-send-email-alpine.art.de@gmail.com> (raw)
In-Reply-To: <20141017180750.GE20696@TP_L520.localdomain>
---
vim/notmuch.vim | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index cad9517..cb6695a 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -477,6 +477,7 @@ ruby << EOF
$db_name = nil
$email = $email_name = $email_address = nil
+ $exclude_tags = []
$searches = []
$threads = []
$messages = []
@@ -496,6 +497,8 @@ ruby << EOF
$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")
end
def vim_puts(s)
@@ -637,6 +640,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.search_threads.count : q.search_messages.count
b << "%9d %-20s (%s)" % [count, name, search]
@@ -648,6 +654,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
--
2.2.1
next prev parent reply other threads:[~2015-01-22 12:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 16:07 [PATCH] VIM: Respect exclude_tags specified in .notmuch-config Franz Fellner
2014-10-20 18:12 ` Ian Main
2014-10-20 19:26 ` Franz Fellner
2014-10-20 22:19 ` Ian Main
2014-10-20 19:30 ` Franz Fellner
2014-11-15 8:15 ` David Bremner
2015-01-22 12:52 ` Franz Fellner [this message]
2015-01-22 19:37 ` [PATCH v2] VIM: Exclude mails tagged with any tag specified in 'notmuch config get search.exclude_tags' in folders list and search list David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421931167-22066-1-git-send-email-alpine.art.de@gmail.com \
--to=alpine.art.de@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).