From: Gaute Hope Date: Sat, 6 Dec 2014 22:39:39 +0000 (+0000) Subject: notmuch_query_add_tag_excluded and notmuch_query_search_threads X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b64ac28567690dcc94b6832040889931b92e0c30;p=notmuch-archives.git notmuch_query_add_tag_excluded and notmuch_query_search_threads --- diff --git a/c9/d836200c2dfec812bb890f32261c1574c284df b/c9/d836200c2dfec812bb890f32261c1574c284df new file mode 100644 index 000000000..8b64fb71f --- /dev/null +++ b/c9/d836200c2dfec812bb890f32261c1574c284df @@ -0,0 +1,92 @@ +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 13496431FC2 + for ; Sat, 6 Dec 2014 14:39:08 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 IqUgIpHvx6SB for ; + Sat, 6 Dec 2014 14:39:04 -0800 (PST) +Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com + [209.85.212.170]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id D785C431FBC + for ; Sat, 6 Dec 2014 14:39:03 -0800 (PST) +Received: by mail-wi0-f170.google.com with SMTP id bs8so4281369wib.3 + for ; Sat, 06 Dec 2014 14:39:01 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:date:from:subject:to:references:in-reply-to + :user-agent:message-id:mime-version:content-type + :content-transfer-encoding; + bh=ZWwARO4dQJj0bmvqgpiaQ8Ma0PxZm95FYVhrojkhw0c=; + b=jj4sk5EQm0BUKk1kEnfNzuPwFSHh8GCLZI3DbswPpaaiZwfShL4MkA+3v52YZMaplx + 1lbxR47uN23m/j568t6oOW2PzHjqC556RWoExL6YEXNpzI/XvPMxffYGKMYx/JM8dH8I + 3C9KPVHX/oZZFnUBFUMKAez77bbn72ZJgE0kkzTgpABAQyDz4mTrZmg+NbIZTD4UzKHb + //B3b/7uXtRu4UneGhtItxcUA7btLKn2zWVefDedfNfvCehmcnXp/22K8j+PipRktL01 + Bozkmsh3QkDCnbRv98NSXgPMJtg/9PYZuKoMK2lbdong36xefJ1dKfcm3OjecbGBRpRn + +0Fw== +X-Gm-Message-State: + ALoCoQnU7K+j7mhkNQe3zlmW9VeIKnM2ya7FpIrMpNdFZI4se15nYLvnEh67iJnJfAl4yRc9et97 +X-Received: by 10.180.228.72 with SMTP id sg8mr13900798wic.48.1417905540293; + Sat, 06 Dec 2014 14:39:00 -0800 (PST) +Received: from localhost (216.89-20-249.enivest.net. [89.20.249.216]) + by mx.google.com with ESMTPSA id bj3sm3447645wib.3.2014.12.06.14.38.58 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 06 Dec 2014 14:38:59 -0800 (PST) +Date: Sat, 06 Dec 2014 22:39:39 +0000 +From: Gaute Hope +Subject: notmuch_query_add_tag_excluded and notmuch_query_search_threads +To: notmuch@notmuchmail.org +References: +In-Reply-To: +User-Agent: astroid/vv0.1-10-gd8f012e1 (https://github.com/gauteh/astroid) +Message-Id: <1417905319-astroid-0-i86er7iwg5-10728@strange> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8; format=flowed +Content-Transfer-Encoding: quoted-printable +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: Sat, 06 Dec 2014 22:39:08 -0000 + +hi, + +I can't quite figure out how to make excluded threads show up in +searches explicitly including the tag. + +If I add the 'muted' tag to all messages in a thread, and set up my +query as follows: + + + notmuch_query_t * query =3D notmuch_query_create (nm_db, + "tag:muted"); + notmuch_query_add_tag_exclude (query, "muted"); + notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_TRUE); + threads =3D notmuch_query_search_threads (query); + +I would expect to have the thread matching, I get nothing however. It +does show up in: $ notmuch search tag:muted (muted added to excluded +tags), but does notmuch search operate with +notmuch_query_search_messages?=20 + +Regards, Gaute + +=