Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 185E5431FAF for ; Mon, 20 Oct 2014 12:26:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8cQf-zicmw63 for ; Mon, 20 Oct 2014 12:26:51 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C31A4431FAE for ; Mon, 20 Oct 2014 12:26:50 -0700 (PDT) Received: by mail-la0-f49.google.com with SMTP id q1so4503269lam.22 for ; Mon, 20 Oct 2014 12:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type:content-transfer-encoding; bh=H6W6eYBCgVD5jyVahsF4hirsW4/gFhW8F1AIvFXDemA=; b=cDy7WSRZjkR7CVbWN0zH96TTCbbiOUX232mHh4EbyyXm6QZRTtj8hm6YJ9jtexfZjx 54QQ15zFACWvYb3NO7SBZK+nXkXnp3rIx4D2JrkFBKyeOqfeWWA9n2IShVw7K3cCEjV/ UU0Q3uQt5Xk0HM64+qqn/XuEa7f9sgzkD1AFaKibcfeJUUfGbR9pQqblWwgSGC2aK4Nt iU4wYVA90O2xbU5PsRkefeih3xWM41ecyRFlm7I8V1BroELjlFtpXHPuXSeW/e7+ezRB wM+Tqm5b2axzmR3sHs+J7mPEeok14z7tKNmxL7QOysVEIYBXtUq0aOvWB4Zhk9NnoqQb +ATQ== X-Received: by 10.112.173.100 with SMTP id bj4mr11664673lbc.78.1413833208874; Mon, 20 Oct 2014 12:26:48 -0700 (PDT) Received: from localhost (p5B00FFDE.dip0.t-ipconnect.de. [91.0.255.222]) by mx.google.com with ESMTPSA id w8sm3592363lbp.46.2014.10.20.12.26.47 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 20 Oct 2014 12:26:47 -0700 (PDT) Date: Mon, 20 Oct 2014 21:26:59 +0200 From: Franz Fellner To: Ian Main , Ian Main Message-ID: <54456203c37d0_25b371be98d9@TP_L520.notmuch> In-Reply-To: <5445508493932_ce1af5e886b@ovo.mains.priv.notmuch> References: <20141017180750.GE20696@TP_L520.localdomain> <5445508493932_ce1af5e886b@ovo.mains.priv.notmuch> Subject: RE: [PATCH] VIM: Respect exclude_tags specified in .notmuch-config Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2014 19:26:55 -0000 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 > > 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 > >