From: Mark Walters Date: Fri, 2 Mar 2012 20:31:47 +0000 (+0000) Subject: Re: [Patch v7 00/13] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4f623df08cfe8ed407488164968fe23347e60887;p=notmuch-archives.git Re: [Patch v7 00/13] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag --- diff --git a/cc/e182584b31e4707c80fc35273e8b69916548ff b/cc/e182584b31e4707c80fc35273e8b69916548ff new file mode 100644 index 000000000..2cd03a6fb --- /dev/null +++ b/cc/e182584b31e4707c80fc35273e8b69916548ff @@ -0,0 +1,154 @@ +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 B2E2B431FAE + for ; Fri, 2 Mar 2012 12:30:07 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.401 +X-Spam-Level: * +X-Spam-Status: No, score=1.401 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + FREEMAIL_REPLY=2.499, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] + 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 SLhHZzEE-P5v for ; + Fri, 2 Mar 2012 12:30:07 -0800 (PST) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id A8F84431E84 + for ; Fri, 2 Mar 2012 12:30:05 -0800 (PST) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1S3Z73-0003dc-5k; Fri, 02 Mar 2012 20:30:01 +0000 +Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] + helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) + (envelope-from ) + id 1S3Z72-0001tN-Kl; Fri, 02 Mar 2012 20:30:00 +0000 +From: Mark Walters +To: notmuch@notmuchmail.org, + Jameson Graef Rollins +Subject: Re: [Patch v7 00/13] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag +In-Reply-To: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com> +References: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com> +User-Agent: Notmuch/0.11.1+277~g6441649 (http://notmuchmail.org) Emacs/23.2.1 + (i486-pc-linux-gnu) +Date: Fri, 02 Mar 2012 20:31:47 +0000 +Message-ID: <871upawxqk.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 94.192.233.223 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: c151b21dddc29410e89bc96fd6679986 (of first 20000 bytes) +X-SpamAssassin-Score: -1.2 +X-SpamAssassin-SpamBar: - +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -1.2 points. + Summary of the scoring: + * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, + * medium trust + * [138.37.6.40 listed in list.dnswl.org] + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay + * domain + * 1.0 FREEMAIL_REPLY From and body contain different freemails + * 0.1 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +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, 02 Mar 2012 20:30:07 -0000 + +On Thu, 1 Mar 2012 22:30:32 +0000, Mark Walters wrote: +> This is essentially the same as +> id:"1330157204-26094-1-git-send-email-markwalters1009@gmail.com" but +> has been rebased against master. The changes are to patch 12/13 for +> notmuch-show.el (which was posted as a followup to the previous series) +> and to the tests (patch 9/13) which changed in Austin's JSON show +> rewrite. + +This series has some significant speed issues in some use cases. It also +defaults to returning excluded messages on the command line which is +wrong. + +This adds an option --include-excluded to tell search to return all +threads (excluded threads will show up as [0/n] in the match column) but +otherwise (default) omits them. + +It is not clear whether there is sufficient utility to make it +worthwhile keeping this option but it should make the series usable +while that is worked out. + +I will try to check old emails and work out what the uses were/corner +cases fixed by the series and post that later. It may be the case that +the show part of this series is worth keeping but not the search part. + +Best wishes + +Mark + + +--->8--- + +>From 64416494f4eceb9f0afbdcb973fd7a82e1e2fcf5 Mon Sep 17 00:00:00 2001 +From: Mark Walters +Date: Fri, 2 Mar 2012 20:19:01 +0000 +Subject: [PATCH] cli: make notmuch-search.c default to omitting excluded messages + +This is a temporary measure to make notmuch-search.c default to +omitting threads only matching in excluded messages entirely. This is +intended as a temporary measure while we decide whether to revert this +part of the exclude_flag series entirely. +--- + notmuch-search.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/notmuch-search.c b/notmuch-search.c +index f6061e4..3d73bd5 100644 +--- a/notmuch-search.c ++++ b/notmuch-search.c +@@ -436,6 +436,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) + int offset = 0; + int limit = -1; /* unlimited */ + notmuch_bool_t no_exclude = FALSE; ++ notmuch_bool_t include_excluded = FALSE; + unsigned int i; + + enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT } +@@ -458,6 +459,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) + { "tags", OUTPUT_TAGS }, + { 0, 0 } } }, + { NOTMUCH_OPT_BOOLEAN, &no_exclude, "no-exclude", 'd', 0 }, ++ { NOTMUCH_OPT_BOOLEAN, &include_excluded, "include-excluded", 'd', 0 }, + { NOTMUCH_OPT_INT, &offset, "offset", 'O', 0 }, + { NOTMUCH_OPT_INT, &limit, "limit", 'L', 0 }, + { 0, 0, 0, 0, 0 } +@@ -514,6 +516,8 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) + for (i = 0; i < search_exclude_tags_length; i++) + notmuch_query_add_tag_exclude (query, search_exclude_tags[i]); + } ++ if (!include_excluded) ++ notmuch_query_set_omit_excluded_messages (query, TRUE); + + switch (output) { + default: +-- +1.7.2.3 +