unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Franz Fellner <alpine.art.de@gmail.com>
To: Ian Main <imain@redhat.com>,  Ian Main <imain@redhat.com>
Cc: notmuch@notmuchmail.org
Subject: RE: [PATCH] VIM: Respect exclude_tags specified in .notmuch-config
Date: Mon, 20 Oct 2014 21:26:59 +0200	[thread overview]
Message-ID: <54456203c37d0_25b371be98d9@TP_L520.notmuch> (raw)
In-Reply-To: <5445508493932_ce1af5e886b@ovo.mains.priv.notmuch>

Ian Main wrote:
> 
> Thanks Franz!
> 
> So this works well in the main searches by not showing anything I have marked
> as 'spam'.  However if I force a search for tag:spam and then try to view any
> of the messages presented they will not show up because of the way we display
> the email..  :-/

Yes, the patch did not work perfectly.
I already fixed that but forgot to send a new PATCH here - Mostly
bacause my git-skills are - ehh - no idea...
I now spent half an hour to somehow get a merged version of those two commits
and ended up with a simple "git diff"...
If you have a good how-to that describes such things I would be happy, because I also
miss the common terms how things are called in git and searching without knowing
what exactly I am looking for is hard...

Here is the commit:
https://github.com/ff2000/notmuch/commit/4fde250b53ce450fec3393d8578458d521a69c91
New patch coming soon.

Franz

> 
> I'm not sure what is the best way to fix this..
> 
>     Ian
> 
> Franz Fellner wrote:
> > 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
> > _______________________________________________
> > notmuch mailing list
> > notmuch@notmuchmail.org
> > http://notmuchmail.org/mailman/listinfo/notmuch
> 
> 

  reply	other threads:[~2014-10-20 19:26 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 [this message]
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

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=54456203c37d0_25b371be98d9@TP_L520.notmuch \
    --to=alpine.art.de@gmail.com \
    --cc=imain@redhat.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).