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 191E0431FB6 for ; Fri, 17 Oct 2014 09:07:48 -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 luSKUy0h497f for ; Fri, 17 Oct 2014 09:07:42 -0700 (PDT) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6BD9C431FAF for ; Fri, 17 Oct 2014 09:07:42 -0700 (PDT) Received: by mail-wg0-f48.google.com with SMTP id k14so1250043wgh.19 for ; Fri, 17 Oct 2014 09:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:to:subject:mime-version:content-type :content-disposition:content-transfer-encoding; bh=P8jga0bxOOQnR37AuSrQiq0/Uex/e31M3/zfHi7+Jf0=; b=zML7GcIJw+gCTIrP1tBsOoZlibdSiqtGGEHH1grSs5MhgKbcE6E4vSmOg9/D+RTLtd 0cEv9rxgKZKbrIC0ZWZ4CqPtDEPPBZLhks0/OAWWdVz9el+2KWdEpqHemZ3hL6V+HTns my5LmDXaCSJYDQDzzhmH8KmkB3+LW81+dFoSxjoaWWhKWqe0kLfJ5XrHkEE7hzd4D8QD 3qWhX78d9acZM1ZraGR9O6+jV6X88x+YkdvjItlFGW2iigXjd+iZggXIqKY/rkpM4Edh wNyScOSAzf3ziF7yTBqoQmO9gO0Tzf9idzKqXHa0K2IanBNWlxP3f4wdiTviMzYeTRyV WGkA== X-Received: by 10.180.73.244 with SMTP id o20mr15473079wiv.9.1413562060884; Fri, 17 Oct 2014 09:07:40 -0700 (PDT) Received: from localhost (p5B00C8AC.dip0.t-ipconnect.de. [91.0.200.172]) by mx.google.com with ESMTPSA id ga7sm2569484wic.5.2014.10.17.09.07.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 17 Oct 2014 09:07:39 -0700 (PDT) Date: Fri, 17 Oct 2014 18:07:50 +0200 Message-ID: <20141017180750.GE20696@TP_L520.localdomain> From: Franz Fellner To: notmuch@notmuchmail.org Subject: [PATCH] VIM: Respect exclude_tags specified in .notmuch-config MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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: Fri, 17 Oct 2014 16:07:48 -0000 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