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 CE12F4196F2 for ; Wed, 21 Apr 2010 20:57:20 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.8 X-Spam-Level: X-Spam-Status: No, score=-2.8 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham 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 0WOumiqwf-3X for ; Wed, 21 Apr 2010 20:57:19 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by olra.theworths.org (Postfix) with ESMTP id D27CF431FC1 for ; Wed, 21 Apr 2010 20:57:19 -0700 (PDT) Received: from localhost ([::1] helo=x200.gr8dns.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1O4nXT-0006wL-Bw; Thu, 22 Apr 2010 03:57:19 +0000 Received: by x200.gr8dns.org (Postfix, from userid 500) id C76F9C0212; Wed, 21 Apr 2010 20:57:18 -0700 (PDT) From: Dirk Hohndel To: Michal Sojka , notmuch Subject: Re: [RFC] reordering and cleanup of thread authors In-Reply-To: References: <87zl1d5fc0.fsf@steelpick.2x.cz> <87aatcysw8.fsf@wsheee.localdomain> Date: Wed, 21 Apr 2010 20:57:18 -0700 Message-ID: User-Agent: notmuch 0.2-52-ga28d2fe (Emacs 23.1.1/i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html 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, 22 Apr 2010 03:57:21 -0000 On Fri, 09 Apr 2010 19:42:49 -0700, Dirk Hohndel wrote: > On Sat, 10 Apr 2010 03:53:59 +0200, Michal Sojka wrote: > > I think that using | as a separator would help here. Let's say that > > initially we have "Matched Author, Non Matched, Matched Again" we can > > tranform this to "Matched Author, Matched Again| Non Matched". This way, > > the length of the string remains the same. If there is no | after > > transformation, we know that all authors matched because there is always > > at least one mathed author in the search results. > > That's a great idea. I'll update the patch to do that. Since Carl just prompted me, I wrote an updated patch (will post in a separate message replying to this one). I made the change suggested by Michal, fixed a bug or two and removed the part of the patch that was trying to cleanup author names in "Last, First" format - on IRC it was pointed out to me that I was overlooking another use of the ',' in email addresses: accounts that are shared by multiple people. And it makes no sense to reorder email addresses of the form "Wife, Husband and child" I haven't given up on this, though. Since Exchange and Outlook have this nasty habit of creating these "Last, First" or "Last, First MI" from headers, I really want to add the option to clean those up. So I'll submit a separate patch that checks if we have exactly one of these two pattern shown here - and that then reorders things /D -- Dirk Hohndel Intel Open Source Technology Center