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 51A7B431FAF for ; Wed, 5 Nov 2014 04:48:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.098 X-Spam-Level: X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, 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 fBkcerrPYrCZ for ; Wed, 5 Nov 2014 04:48:45 -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 3909D431FAE for ; Wed, 5 Nov 2014 04:48:45 -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 1Xm00w-0003bf-Ql; Wed, 05 Nov 2014 12:48:43 +0000 Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) (envelope-from ) id 1Xm00w-0001Y5-I7; Wed, 05 Nov 2014 12:48:42 +0000 From: Mark Walters To: Michal Sojka , notmuch@notmuchmail.org Subject: Re: [PATCH v2 06/10] cli: Introduce "notmuch address" command In-Reply-To: <87y4rpkf8n.fsf@steelpick.2x.cz> References: <1415058622-21162-1-git-send-email-sojkam1@fel.cvut.cz> <1415058622-21162-7-git-send-email-sojkam1@fel.cvut.cz> <87zjc72v79.fsf@qmul.ac.uk> <87y4rqliid.fsf@steelpick.2x.cz> <87d291ao34.fsf@qmul.ac.uk> <87y4rpkf8n.fsf@steelpick.2x.cz> User-Agent: Notmuch/0.18.1+86~gef5e66a (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Wed, 05 Nov 2014 12:48:41 +0000 Message-ID: <87a945ak46.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Sender-Host-Address: 87.81.223.162 X-QM-Geographic: According to ripencc, this message was delivered by a machine in Britain (UK) (GB). X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 840656755c9a387761a0738326f2a88f (of first 20000 bytes) X-SpamAssassin-Score: -0.1 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 -0.1 points. Summary of the scoring: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * -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: Wed, 05 Nov 2014 12:48:50 -0000 On Wed, 05 Nov 2014, Michal Sojka wrote: > On Wed, Nov 05 2014, Mark Walters wrote: >> On Tue, 04 Nov 2014, Michal Sojka wrote: >>> On Tue, Nov 04 2014, Mark Walters wrote: >>>> On Mon, 03 Nov 2014, Michal Sojka wrote: >>>>> This moves address-related functionality from search command to the >>>>> new address command. The implementation shares almost all code and >>>>> some command line options. >>>>> >>>>> Options --offset and --limit were intentionally not included in the >>>>> address command, because they refer to messages numbers, which users >>>>> do not see in the output. This could confuse users because, for >>>>> example, they could see more addresses in the output that what was >>>>> specified with --limit. This functionality can be correctly >>>>> reimplemented for addresses later. >>>> >>>> I am not sure about this: we already have this anomaly for output=3Dfi= les >>>> say. Also I can imagine calling notmuch address --limit=3D1000 ... to = get >>>> a bunch of recent addresses quickly and I really am wanting to look at >>>> 1000 messages, not collect 1000 addresses. >>> >>> I think that one of the reasons for having the new "address" command is >>> to have cleaner user interface. And including "anomalies" doesn't sound >>> like a way to achieve this. I think that now you can use "date:" query >>> to limit the search. >>> >>> I volunteer to implement "address --limit" properly after 0.19. This >>> should be easy. >> >> I think this depends on how you view limit: is it to limit the output >> (roughly to run "head" on the output), or is to bound the amount of work >> notmuch has to do (eg to make sure you don't get a long delay). Your >> suggestion is definitely the former, whereas I am more worried about the >> latter: limit in your definition could take an essentially unbounded >> amount of time. > > Why? If I understand you correctly, you think of limit in terms of > messages. There is 1:N mapping between messages and addresses, where > N=C2=A0>=3D=C2=A01. If I limit the number of printed addresses, I limit t= he number > of messages as well. Only if N is zero (which probably can be the case > with Bcc and --output=3Drecipients) then it can result in unbounded work > (provided you have infinite number of Bcc only messages in your > database=C2=A0:-)). Hi=20 I was assuming the limit in your scheme would come after the deduplication: so notmuch would have to find "limit" distinct addresses. If the limit is applied before the deduping then I agree work is bounded (in any sane case). If limit is applied before the deduping then that seems fine. Best wishes=20 Mark > > Do I miss something? > > -Michal