From: Michal Sojka Date: Fri, 9 Jan 2015 15:29:17 +0000 (+0100) Subject: Re: [PATCH v3 10/10] cli: address: Add --filter-by option to configure address filtering X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c9408ed26e7900dfc12eb1c47c47c171f150e7e6;p=notmuch-archives.git Re: [PATCH v3 10/10] cli: address: Add --filter-by option to configure address filtering --- diff --git a/d4/2c9c643c70f98688ab76515e0b3f826a9f8ad0 b/d4/2c9c643c70f98688ab76515e0b3f826a9f8ad0 new file mode 100644 index 000000000..d55f29227 --- /dev/null +++ b/d4/2c9c643c70f98688ab76515e0b3f826a9f8ad0 @@ -0,0 +1,148 @@ +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 99A95431FDB + for ; Fri, 9 Jan 2015 07:29:25 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.138 +X-Spam-Level: +X-Spam-Status: No, score=0.138 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438, 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 gLiHiy-CEDEG for ; + Fri, 9 Jan 2015 07:29:23 -0800 (PST) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by olra.theworths.org (Postfix) with ESMTP id 078EF431FD8 + for ; Fri, 9 Jan 2015 07:29:23 -0800 (PST) +Received: from localhost (unknown [192.168.200.7]) + by max.feld.cvut.cz (Postfix) with ESMTP id 706CE4CC66C; + Fri, 9 Jan 2015 16:29:22 +0100 (CET) +X-Virus-Scanned: IMAP STYX AMAVIS +Received: from max.feld.cvut.cz ([192.168.200.1]) + by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, + port 10044) + with ESMTP id lw0wHGCfw91H; Fri, 9 Jan 2015 16:29:18 +0100 (CET) +Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) + by max.feld.cvut.cz (Postfix) with ESMTP id 47B1C4CC675; + Fri, 9 Jan 2015 16:29:18 +0100 (CET) +Received: from wsh by steelpick.2x.cz with local (Exim 4.84) + (envelope-from ) + id 1Y9bUz-0004dw-Sx; Fri, 09 Jan 2015 16:29:17 +0100 +From: Michal Sojka +To: Tomi Ollila , David Bremner , + notmuch@notmuchmail.org +Subject: Re: [PATCH v3 10/10] cli: address: Add --filter-by + option to configure address filtering +In-Reply-To: +References: <1415147159-19946-1-git-send-email-sojkam1@fel.cvut.cz> + <1415147159-19946-11-git-send-email-sojkam1@fel.cvut.cz> + <87vbkrfs66.fsf@maritornes.cs.unb.ca> + + <87egr46qcs.fsf@steelpick.2x.cz> + +User-Agent: Notmuch/0.18.2+178~g6e9e8bb (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Fri, 09 Jan 2015 16:29:17 +0100 +Message-ID: <871tn46khe.fsf@steelpick.2x.cz> +MIME-Version: 1.0 +Content-Type: text/plain +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, 09 Jan 2015 15:29:25 -0000 + +On Fri, Jan 09 2015, Tomi Ollila wrote: +> On Fri, Jan 09 2015, Michal Sojka wrote: +> +>> Hi, +>> +>> sorry for longer response time :) +>> +>> On Thu, Jan 01 2015, Tomi Ollila wrote: +>>> On Wed, Dec 31 2014, David Bremner wrote: +>>> +>>>> Michal Sojka writes: +>>>> +>>>>> This option allows to configure the criterion for duplicate address +>>>>> filtering. Without this option, all unique combinations of name and +>>>>> address parts are printed. This option allows to filter the output +>>>>> more, for example to only contain unique address parts. +>>>> +>>>> I had the feeling there was some "controversy" about the UI here, but +>>>> following back the 3 versions of the series I didn't see it. Does that +>>>> mean we just need to sanity check the code, or are there outstanding +>>>> bikes to shed? +>> +>> I'd tend to rename this option to --unique as it was in some previous +>> version of the patch. Another thing in my mind is the implementation of +>> the --complete option mentioned in id:878uid9qjl.fsf@nautilus.nautilus. +>> This would also involve some kind of address filtering. I'll look into +>> this and send patches later. +>> +>>> I have intentionally been guiet on this during the review process of the +>>> other patches to not slow down the acceptance of the others. I have not +>>> got enough time to look the implemenentation or think this last patch +>>> further -- from the user interface point of view I recall seeing there +>>> both useless features (but which might be warranted by implementation +>>> simplicity) and missing features (but which might not be there due to +>>> difficulty in implementation). Also, I am not sure whether the --filter-by +>>> is good option (and options descriptive...)... +>> +>> I'd be interested in what are these "missing features". +> +> Last night when I tried to catch sleep I was also thinking of this... +> ... let's see what I remember... +> +> First, Currently if we have addresses: +> +> "Uni Que" +> "Uni Que" +> +> I presume these are thought as a separate addresses -- and an option to +> thought these as the same would be useful. + +Yes, this would correspond to --unique=addrfold or --unique=nameaddrfold +from my patch. + +> but let's consider second set of addresses: +> +> "Uni Que" +> "Uni Keko" +> +> Now, if there were an option to consider these 2 as the same, that would +> hide user from one of the names -- It is clear that "Uni Que" is the right +> one but if only "Uni Keko" (sleepyhead, that is) is shown user don't have +> a choice to select the right one. I am not sure what the use case for +> "uniquing" these 2 were. + +For example, when you are interested in the number of people involved in +a discussion. You care only about the address and not about the names. +Perhaps you'd like to see only the addresses in the output and not the +names in this case, wouldn't you? + +> Finally (for now), 3rd set of addresses +> +> "Uni Que" +> "Uni Que" +> +> Now, if there were an option to consider these 2 as same, and +> user is then given "Uni Que" (which clearly is +> the wrong one) I don't see the usefullness of this option... + +I agree. This would correspond to --unique=name. So I'll drop this +option. + +-Michal