From: Michal Sojka Date: Thu, 30 Oct 2014 21:42:02 +0000 (+0100) Subject: Re: [PATCH v4 5/6] cli: search: Add configurable way to filter out duplicate addresses X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=69abe6d434ec273aaaa51d97edcc367989975140;p=notmuch-archives.git Re: [PATCH v4 5/6] cli: search: Add configurable way to filter out duplicate addresses --- diff --git a/26/6f41162072afb422df367e2719705673a266f2 b/26/6f41162072afb422df367e2719705673a266f2 new file mode 100644 index 000000000..ce057e2e2 --- /dev/null +++ b/26/6f41162072afb422df367e2719705673a266f2 @@ -0,0 +1,97 @@ +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 1F5C7431FCB + for ; Thu, 30 Oct 2014 14:42:21 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[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 u1hw+8cjpkqz for ; + Thu, 30 Oct 2014 14:42:13 -0700 (PDT) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by olra.theworths.org (Postfix) with ESMTP id 21CD6431FC2 + for ; Thu, 30 Oct 2014 14:42:13 -0700 (PDT) +Received: from localhost (unknown [192.168.200.7]) + by max.feld.cvut.cz (Postfix) with ESMTP id B8A205CCFD4; + Thu, 30 Oct 2014 22:42:11 +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 5JGoEgklQqgv; Thu, 30 Oct 2014 22:42:07 +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 9D8F55CCFD1; + Thu, 30 Oct 2014 22:42:07 +0100 (CET) +Received: from wsh by steelpick.2x.cz with local (Exim 4.84) + (envelope-from ) + id 1XjxTm-0005zv-2s; Thu, 30 Oct 2014 22:42:02 +0100 +From: Michal Sojka +To: Tomi Ollila , + Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH v4 5/6] cli: search: Add configurable way to filter out + duplicate addresses +In-Reply-To: +References: <1414421455-3037-1-git-send-email-sojkam1@fel.cvut.cz> + <1414421455-3037-6-git-send-email-sojkam1@fel.cvut.cz> + <87egtqug4t.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.18.2+157~ga00d359 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Thu, 30 Oct 2014 22:42:02 +0100 +Message-ID: <871tppck0l.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: Thu, 30 Oct 2014 21:42:21 -0000 + +On Thu, Oct 30 2014, Tomi Ollila wrote: +> On Thu, Oct 30 2014, Mark Walters wrote: +> +>> On Mon, 27 Oct 2014, Michal Sojka wrote: +>>> This adds an algorithm to filter out duplicate addresses from address +>>> outputs (sender, receivers). The algorithm can be configured with +>>> --filter-by command line option. +>>> +>>> The code here is an extended version of a patch from Jani Nikula. +>> +>> Hi +>> +>> As this is getting into the more controversial bike shedding region I +>> wonder if it would be worth splitting this into 2 patches: the first +>> could do the default dedupe based on name/address and the second could +>> do add the filter-by options. +>> +>> I think the default deduping is obviously worth doing but I am not sure +>> about the rest. In any case I think the default deduping could go in +>> pre-freeze but I would recommend the rest is left until after. +> +> I can agree with that, but there is one hard thing to resolve: +> "naming things"(*) +> +> (*) http://martinfowler.com/bliki/TwoHardThings.html +> +> With all rest ignored (sorry no time to work on this in more detail now), +> this default deduping could be done with single argument '--unique'... + +I would agree that --unique is slightly better than --filter-by, but I +don't see what is so attractive on having no deduplication at all. +Anyway, I'll keep it in v5 as it is now and we can add +--unique=no/none/whatever later. + +-Michal