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 A6FC5431FAF for ; Wed, 1 Aug 2012 04:24:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 6m+lYwtRDyfm for ; Wed, 1 Aug 2012 04:24:31 -0700 (PDT) Received: from mail-gh0-f181.google.com (mail-gh0-f181.google.com [209.85.160.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 41A0C431FAE for ; Wed, 1 Aug 2012 04:24:31 -0700 (PDT) Received: by ghbz13 with SMTP id z13so8683758ghb.26 for ; Wed, 01 Aug 2012 04:24:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:x-gm-message-state; bh=XofFv/v9L9uT2UJvtpUM9UZfx0x7rC5CTxyOVrQvbv8=; b=RFRKpANnNw8PAq1gHUw9/AgYZ0SYCdU4lgQsN0tSj45u5Vgg19fN+4HDi9Ufn2nDum IOWkIQAsohQD35NDAbUiPY0iwqr2uTql+/va0PHWj/krMxLhCYFq9nzWTTkhqPJ6JO04 xwQ8hFO51JCJHSrrA1OebfxQytbvNlFa7SyCv0pP1YThGl24gymZYngWaXH93InF/rqh hU/l6ObOhngB392rs1FAfKphhId5Pj7OnWR1k9dfBUFV47uwJNZbtpOponkIum6vY8+C LYeyj1aqfcFQg8iFy27cQNcVC4ZBKgzUgOrMNvlRS1dmgGSO4awXGiupKAq+AS7OtHMK GcqQ== Received: by 10.236.191.69 with SMTP id f45mr17026250yhn.8.1343820270188; Wed, 01 Aug 2012 04:24:30 -0700 (PDT) Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3]) by mx.google.com with ESMTPS id e24sm5077919yhh.4.2012.08.01.04.24.28 (version=SSLv3 cipher=OTHER); Wed, 01 Aug 2012 04:24:29 -0700 (PDT) From: Jani Nikula To: Stefano Zacchiroli , notmuch@notmuchmail.org Subject: Re: notmuch-mutt: support for duplicate message removal In-Reply-To: <1343808582-9519-1-git-send-email-zack@upsilon.cc> References: <1343808582-9519-1-git-send-email-zack@upsilon.cc> User-Agent: Notmuch/0.13.2+106~gb810aee (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Wed, 01 Aug 2012 13:24:24 +0200 Message-ID: <87pq7aam8n.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gm-Message-State: ALoCoQly4gMwrJiDfAxK9OXC+rc3d6VUSRzh1eTZkMWMIM14UhtmSfcXOObjI4hMtl9HMqIB/Do/ Cc: "Kevin J. McCarthy" 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, 01 Aug 2012 11:24:32 -0000 On Wed, 01 Aug 2012, Stefano Zacchiroli wrote: > Heya, > here is a patchset originating from a feature contributed by Kevin > J. McCarthy: duplicate message removal for notmuch-mutt searches. > > I've reviewed the main patch and gone through various iterations of it > with Kevin. I consider it suitable for application in its present > form, and I've added a subsequent patch to fix the Debian packaging > accordingly. > > Can someone with commit access be so kind of applying this patchset to > the master branch? > > Also, if you've further comments on the patch, do not hesitate! I'm guessing you get the duplicates because you have dupes in the mail store, and 'notmuch search --output=files' prints all the filenames associated with each matching message, rather than any other reason. The presented approach will only remove identical files, and will leave behind files that are basically the same message, but have differing headers, e.g. due to being received through different channels. Is this what you want? Perhaps an option to 'notmuch search --output=files' to print only one filename (even if there are many) per message would be interesting. IIRC the first filename is used by 'notmuch show' to display the message anyway. At a glance, this should be trivial to implement, but would it cover your needs? BR, Jani.