From 0a321ba767d975d62f3a3e754465fb8d5d616cb4 Mon Sep 17 00:00:00 2001 From: Kushal Kumaran Date: Fri, 16 May 2014 23:27:07 +0530 Subject: [PATCH] Re: exclude tags --- 45/913ef850ac44d73712c223f82da37552dddf27 | 122 ++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 45/913ef850ac44d73712c223f82da37552dddf27 diff --git a/45/913ef850ac44d73712c223f82da37552dddf27 b/45/913ef850ac44d73712c223f82da37552dddf27 new file mode 100644 index 000000000..7549080a1 --- /dev/null +++ b/45/913ef850ac44d73712c223f82da37552dddf27 @@ -0,0 +1,122 @@ +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 0DB2D431FBC + for ; Fri, 16 May 2014 10:57:23 -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 gbmV93NtreRV for ; + Fri, 16 May 2014 10:57:18 -0700 (PDT) +Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com + [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id CB501431FB6 + for ; Fri, 16 May 2014 10:57:18 -0700 (PDT) +Received: by mail-qc0-f181.google.com with SMTP id m20so4891920qcx.12 + for ; Fri, 16 May 2014 10:57:18 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=sender:from:to:subject:in-reply-to:references:user-agent:date + :message-id:mime-version:content-type; + bh=2zvUQ4cz1IXCwf4UZJntOqa1m1BKwjLOfDQ4LhLkuqg=; + b=Pqi1YAFBMOt8GoQh2bddcfKmwD1quTtQy2Kvykc2CQ5wofUy/+ylXfoxWztrebG/tq + H/lIYrQhU4+sTFLfsjpuTqeoWy/bdTD+yYY2YEASZRgc7JaygX81cOvUiLD3nC5vQ49F + lXwbNKZvSsk+kIW3D9D2Aw1qO9sie3xXfzoRkwdI++ZUinRTr5/Qg4zAKY+ICMgxpUZ5 + tsr9e81TzVq++f7BEnqzI57mhwhysTD5jkTum7V+UkOhH1pCJZ/gbj/YnMdbJQ/rmSVT + 97qTgXbMjN+2vfm/6Kq1SgeOwpQgpqt8ycn3GS55eaylrKp5llncCUOi510nz41th5T7 + fiMA== +X-Received: by 10.140.31.196 with SMTP id f62mr26227803qgf.59.1400263038176; + Fri, 16 May 2014 10:57:18 -0700 (PDT) +Received: from magnesium ([198.199.83.138]) + by mx.google.com with ESMTPSA id g8sm5536086qgf.43.2014.05.16.10.57.16 + for + (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); + Fri, 16 May 2014 10:57:16 -0700 (PDT) +X-Google-Original-Message-ID: <874n0py5cc.fsf@carbon.locationd.net.> +Sender: Kushal Kumaran +Received: by magnesium (Postfix, from userid 1000) + id 8951B4C2BF; Fri, 16 May 2014 23:27:15 +0530 (IST) +From: Kushal Kumaran +To: notmuch@notmuchmail.org +Subject: Re: exclude tags +In-Reply-To: +References: +User-Agent: Notmuch/0.17+251~g8ecc7db (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Fri, 16 May 2014 23:27:07 +0530 +Message-ID: <5376517c.086b8c0a.bb5f.fffff90d@mx.google.com> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha1; protocol="application/pgp-signature" +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, 16 May 2014 17:57:23 -0000 + +--=-=-= +Content-Type: text/plain +Content-Transfer-Encoding: quoted-printable + +Wael Nasreddine writes: + +> Hey guys, +> +> I am trying to exclude any thread that has the tag *killed* but it's +> either a bug or something that I am simply doing wrong. +> +> $ notmuch search tag:work and tag:unread and tag:inbox and not tag:kille= +d | grep 'killed' | wc -l +> 1 +> +> I am getting the same result with Trusty shipped notmuch v0.17 and with +> today's build. +> + +Search works by matching messages. So if you have a thread with at +least one message which does not have that tag, that thread will still +show up in a "not tag:killed" search. + +The way I maintain killed threads is to search for tag:killed, and then +call notmuch tag -inbox -unread for all those threads. Here's my code +to do this: + + # killed threads + for th in $(notmuch search --output=3Dthreads -- tag:killed); do + notmuch tag -inbox -unread -new -- $th + done + +=2D-=20 +regards, +kushal + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQEcBAEBAgAGBQJTdlFzAAoJEKolkdITDqLtUaIH/3Jqj/Yon2/jQwZ/j9oQBR6G +RKVkkxKYUL9nsO8Kb5E4+h4EOwMkMx7tWe3PxJrD3iYb07FZ04EmqxLxgWjADHsf +l+lXuQ9yJs0/HqxkCASkgDJF1bP0ASgL1ecGpSKgXqvPpH5vSNvcRUjFahRw88dB +HcJfbCr7FYGgfDYDEXc2vF8j4pvSpCYTQmC8ByHowDh/OOUe/kgtO5E8tQ/WgNTn +GJLdcUUtntDV8dvEyMR6/vEm2d99ISSjuwgLtZwt68gd+yu8eQHFZX9+2FxeORnO +Rlgci6UccQLSysJmISBVLymJ2BNjdsGMhYXviy6eds30pPjgzTq64Kyj0FgO4M0= +=gNVt +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2