From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id E10726DE0C5F for ; Thu, 7 Sep 2017 12:42:16 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.012 X-Spam-Level: X-Spam-Status: No, score=-0.012 tagged_above=-999 required=5 tests=[AWL=0.097, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FSL_HELO_NON_FQDN_1=0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WbDdqGc3g66t for ; Thu, 7 Sep 2017 12:42:12 -0700 (PDT) Received: from charon (jb55.com [45.79.91.128]) by arlo.cworth.org (Postfix) with ESMTPS id 5B69D6DE0C51 for ; Thu, 7 Sep 2017 12:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d= jb55.com; h=from:to:subject:date:message-id; s=default; bh=f/jSIhVZ9iS2nFVgQDDUDslr73INfib8ggU3FeA5AzA=; b=UWnvk2C52/iaUU9soAu2voSzpA6d+lW9kwNkpXVwbnF3xp3KbaSl8CZtjco7AmRIbBZC+R7c4W2/dKnRjw1q26H6y83hGButOVpFl1e82x0YaYRJ4A3/5NBlVkslmI9Foq8gIiM+IJ/aKwXoY0fN/82ki1JkSkN5UYSyJqE6A1ozQw+aHtOlHOLtEHqaVsvfPgF1HDYjtmS59sZt/6hdKfoM0tlPwpSga9fTx3coJnU0YkRgLZdUX5UgT1dijRW7DsasTBte3b74lc9ul1mphIVBCQoBcaCQaESzi8KLx9PMBI+Kya6V39GfKPFG4Qj8yY2S6z3jeU9QCQVgJNQlaA== Received: from jb55.com (70-36-49-138.dyn.novuscom.net [70.36.49.138]) by jb55.com (OpenSMTPD) with ESMTPSA id 42fe4b93 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 7 Sep 2017 19:42:11 +0000 (UTC) From: William Casarin To: David Bremner , Jani Nikula Cc: notmuch@notmuchmail.org, notmuch@freelists.org Subject: Re: [PATCH 1/3] sorting: add the ability to sort by from and subject In-Reply-To: <8760cyxgu3.fsf@tethera.net> References: <20170904160040.23642-1-jb55@jb55.com> <87efrm70ai.fsf@nikula.org> <87wp5ew7v6.fsf@jb55.com> <87r2vmw6ev.fsf@jb55.com> <8760cyxgu3.fsf@tethera.net> Date: Thu, 07 Sep 2017 12:42:11 -0700 Message-ID: <87h8wee1nw.fsf@jb55.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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, 07 Sep 2017 19:42:17 -0000 David Bremner writes: > It seems worth mentioning that it's possible to preprocess values into > keys (see Xapian::Enquire::set_sort_by_key). So things like Re: > etc... could be stripped. Hmm looks like I need to create a KeyMaker class which appears to be a glorified (Xapian::Document -> String) callback. Shouldn't be too difficult other than the choice of algorithm. It would have to strip: Re: Fwd: ... etc? Sounds like the choice algorithm could be tricky and/or error prone? Would need lots of tests, and like Jani said, questionable worth in these scenarios, considering I was mainly dealing with scenarios like these: From: Top News - MIT Technology Review From: Newest questions tagged haskell - Stack Overflow So the current implementation would only be useful for RSS feeds, automated bots, etc. that are non-mailing-list-email use cases. I'm working on updates to notmuch-mode right now. I'll post a patch for that soon for people who are interested. - William