unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] VIM: Respect exclude_tags specified in .notmuch-config
@ 2014-10-17 16:07 Franz Fellner
  2014-10-20 18:12 ` Ian Main
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Franz Fellner @ 2014-10-17 16:07 UTC (permalink / raw)
  To: notmuch

commit 558719b9ea9c218117c448cf4c7bd671de14d968
Author: Franz Fellner <alpine.art.de@gmail.com>
Date:   Fri Oct 17 17:53:58 2014 +0200

    Exclude tags specified by
    notmuch config get search.exclude_tags

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 5c86fcd..b8d11fe 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -647,6 +647,7 @@ ruby << EOF
 	$db_name = nil
 	$all_emails = []
 	$email = $email_name = $email_address = nil
+	$exclude_tags = []
 	$searches = []
 	$threads = []
 	$messages = []
@@ -672,6 +673,8 @@ ruby << EOF
 		# Add the primary to this too as we use it for checking
 		# addresses when doing a reply
 		$all_emails.unshift($email_address)
+		ignore_tags = get_config_item('search.exclude_tags')
+		$exclude_tags = ignore_tags.split("\n")
 	end
 
 	def vim_puts(s)
@@ -924,6 +927,9 @@ ruby << EOF
 
 		def query(*args)
 			q = @db.query(*args)
+			$exclude_tags.each { |t|
+				q.add_tag_exclude(t)
+			}
 			@queries << q
 			q
 		end

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-01-22 19:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2] VIM: Exclude mails tagged with any tag specified in 'notmuch config get search.exclude_tags' in folders list and search list Franz Fellner
2015-01-22 19:37   ` David Bremner

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).