From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 81E76429E54 for ; Mon, 23 Jan 2012 17:18:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=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 NrkpahntNI8t for ; Mon, 23 Jan 2012 17:18:09 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D4EA4429E21 for ; Mon, 23 Jan 2012 17:18:08 -0800 (PST) Received: by mail-we0-f181.google.com with SMTP id b10so3021166wer.26 for ; Mon, 23 Jan 2012 17:18:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=bfevquQ8dxwQhJdMCbxkQXnh+9BrUMQ9fI+oDFnFf9w=; b=SzZtZnQ2sbEKDSqVqHpx3JZAuEzcBUhZQrI67ciEBJSIqMC337S2VkBRELNuFH5YC7 3ZUmQPlAOG0IoAld48vKYEcr1Q4jzH0UXoqGtITBxZMnibomuQ8ij7SR1bUzLrBtZMhi r/JU1APtTn17S2zgCZ05qR54FGQ1yH8CVAb+k= Received: by 10.216.133.26 with SMTP id p26mr1990wei.36.1327367888578; Mon, 23 Jan 2012 17:18:08 -0800 (PST) Received: from localhost (94-192-233-223.zone6.bethere.co.uk. [94.192.233.223]) by mx.google.com with ESMTPS id di5sm46967680wib.3.2012.01.23.17.18.07 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Jan 2012 17:18:07 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org, Austin Clements Subject: [PATCH 4/4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag Date: Tue, 24 Jan 2012 01:18:43 +0000 Message-Id: <1327367923-18228-4-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <20120124011609.GX16740@mit.edu> References: <20120124011609.GX16740@mit.edu> 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: Tue, 24 Jan 2012 01:18:09 -0000 Make notmuch-search.c respect the NOTMUCH_MESSAGE_FLAG_EXCLUDED. All tests should pass: i.e., the behaviour should be the same as before the series. --- notmuch-search.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 8867aab..b005abf 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -227,7 +227,7 @@ do_search_threads (const search_format_t *format, thread = notmuch_threads_get (threads); - if (i < offset) { + if ((i < offset) || (notmuch_thread_get_matched_messages (thread) == 0)) { notmuch_thread_destroy (thread); continue; } @@ -318,6 +318,9 @@ do_search_messages (const search_format_t *format, message = notmuch_messages_get (messages); + if (notmuch_message_get_flag (message, NOTMUCH_MESSAGE_FLAG_EXCLUDED)) + continue; + if (output == OUTPUT_FILES) { filenames = notmuch_message_get_filenames (message); -- 1.7.2.3