From 9d428f82897029ba30325480e1fda68d8882d41f Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Wed, 30 May 2012 13:07:33 +1000 Subject: [PATCH] Re: search summary and exclusions --- 03/c6f5b51ddb39406d21300c0be189a894e09edf | 117 ++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 03/c6f5b51ddb39406d21300c0be189a894e09edf diff --git a/03/c6f5b51ddb39406d21300c0be189a894e09edf b/03/c6f5b51ddb39406d21300c0be189a894e09edf new file mode 100644 index 000000000..40e51bb4e --- /dev/null +++ b/03/c6f5b51ddb39406d21300c0be189a894e09edf @@ -0,0 +1,117 @@ +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 92D50431FB6 + for ; Tue, 29 May 2012 20:07:43 -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 EztMcEF8g96A for ; + Tue, 29 May 2012 20:07:43 -0700 (PDT) +Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com + [209.85.210.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 063E7431FAF + for ; Tue, 29 May 2012 20:07:42 -0700 (PDT) +Received: by dadg9 with SMTP id g9so7839723dad.26 + for ; Tue, 29 May 2012 20: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:in-reply-to:references:mime-version + :content-type:content-disposition:content-transfer-encoding; + bh=kxBCC7D+T9pyzrLba7Tgb+v+SmCh3vpw2ZSZTbCySrA=; + b=vOt4GBS/zgS2/JCzQ2tivE/FgcQLQc4bC1TLiDfdfmBAsF08oRyvw3ajV+ec3GNltC + 2DNYDtOHrQINhA6cGhaSyOPxSnvEGFH6dheXAu/jMoFq+gz6Rkp1HR9CWjCwjk3KOimF + XPFKfEJONPsUorlDv/PeuehYK88vt+QspB8YU1G8XV56UGKFhogjqqIz/BWtGWjmVLdM + S+EOrzkd0QlEGCXe7dozyqrj8ZNN9viticLB1r+WackhSrjb6BlYceRf+f0xjLfQiJ3F + O2+NQpiP1kj7pB3tVttqV3xYLHb9P/RUnjeLpP8r55UF0FWe4iwvSPUGyhJEbjzKNz+x + GBMg== +Received: by 10.68.228.200 with SMTP id sk8mr44687468pbc.94.1338347260990; + Tue, 29 May 2012 20:07:40 -0700 (PDT) +Received: from localhost (215.42.233.220.static.exetel.com.au. + [220.233.42.215]) + by mx.google.com with ESMTPS id sa5sm22517567pbc.2.2012.05.29.20.07.36 + (version=TLSv1/SSLv3 cipher=OTHER); + Tue, 29 May 2012 20:07:38 -0700 (PDT) +Date: Wed, 30 May 2012 13:07:33 +1000 +Message-ID: <20120530130733.GC2332@hili.localdomain> +From: Peter Wang +To: notmuch@notmuchmail.org +Subject: Re: search summary and exclusions +In-Reply-To: <87fwajnibz.fsf@servo.finestructure.net> +References: <20120529000012.GF2331@hili.localdomain> + <87mx4sp79z.fsf@servo.finestructure.net> + <20120529140107.GE2347@hili.localdomain> + <87fwajnibz.fsf@servo.finestructure.net> +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: Wed, 30 May 2012 03:07:43 -0000 + +On Tue, 29 May 2012 08:00:00 -0700, Jameson Graef Rollins wrote: +> On Mon, May 28 2012, Peter Wang wrote: +> > % ./notmuch search --format=json --exclude=true -- thread:0000000000009598 tag:unread +> > [{"thread": "0000000000009598", +> > "timestamp": 1338231998, +> > "date_relative": "Today 05:06", +> > "matched": 1, +> > "total": 15, +> > "authors": "Mark Walters| Peter Wang", +> > "subject": "[PATCH v6 3/6] cli: make --entire-thread=false work for format=json.", +> > "tags": ["deleted", "draft", "replied", "sent", "unread"]}] +> > +> > Here is a thread I participated in. From this, my MUA displays "1/15", +> > suggesting that there is 1 unread message out of a total of 15. But +> > upon opening the thread, there are only 11 messages visible: 4 were +> > drafts (possibly deleted) which have been excluded. To the user, it +> > looks like some messages went missing. +> > +> > Therefore I would like search --output=summary --exclude=true +> > to report the total number of non-excluded messages. It doesn't need to +> > be via the "total" field; a new field would be fine. +> +> What you have pasted above is --output=json, not --output=summary. The +> formats are quite different. What are you asking for a change in? + +--output=summary is the default. --format=json only changes the +surface syntax. + +% ./notmuch search --output=summary --exclude=true -- thread:0000000000009598 tag:unread +thread:0000000000009598 Yest. 05:06 [1/15] Mark Walters| Peter Wang; [PATCH v6 3/6] cli: make --entire-thread=false work for format=json. (deleted draft replied sent unread) + +> But regardless, I don't think I would like to see the changes you +> suggest. I would like for the thread total to list the total number of +> messages in the thread, regardless whether they're excluded or not. +> Same for the tags. I think I want to continue to see if excluded +> messages are in a returned thread. The desire to hide the excluded +> messages in the output is why they're marked as hidden/not visible. +> +> Think about the excludes as acting on the search itself, and less on the +> output. We exclude messages from search, but if they show up in a +> returned thread we at least acknowledge that they're there. + +Understood; it's a two-phase process, and I wasn't making the +distinction. If it is the expected and useful behaviour, so be it. + +Maybe there is room for another keyword under --exclude? + +Peter -- 2.26.2