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 93617431FD0 for ; Wed, 2 Nov 2011 02:27:49 -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 bHJrE9nlgycI for ; Wed, 2 Nov 2011 02:27:49 -0700 (PDT) Received: from mail-vw0-f53.google.com (mail-vw0-f53.google.com [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id F316D431FB6 for ; Wed, 2 Nov 2011 02:27:48 -0700 (PDT) Received: by vws19 with SMTP id 19so3113057vws.26 for ; Wed, 02 Nov 2011 02:27:47 -0700 (PDT) Received: by 10.52.27.208 with SMTP id v16mr3758205vdg.22.1320226067104; Wed, 02 Nov 2011 02:27:47 -0700 (PDT) Received: from localhost (nikula.org. [92.243.24.172]) by mx.google.com with ESMTPS id il5sm2554890vdb.7.2011.11.02.02.27.43 (version=SSLv3 cipher=OTHER); Wed, 02 Nov 2011 02:27:44 -0700 (PDT) From: Jani Nikula To: David Bremner , notmuch@notmuchmail.org Subject: Re: [RFC PATCH v2 0/3] lib/cli/emacs: limit number of messages in search results In-Reply-To: <87zkgg6n3z.fsf@zancas.localnet> References: <87zkgg6n3z.fsf@zancas.localnet> User-Agent: Notmuch/0.5-232-g917e874 (http://notmuchmail.org) Emacs/23.1.1 (i686-pc-linux-gnu) Date: Wed, 02 Nov 2011 09:27:41 +0000 Message-ID: <87aa8ekh6a.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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, 02 Nov 2011 09:27:49 -0000 On Tue, 01 Nov 2011 09:30:56 -0300, David Bremner wrote: > Is just because it add a function to the library that you think this > might be problematic? I don't think we are super-dogmatic about the > library never growing. When notmuch started, there were no bindings, so > in retrospect maybe more functionality went into the CLI than might > happen if we started from scratch. If I remember Carl's statement > correctly, one rule is that stuff in the library should not require > configuration. Hi, thanks, that's encouraging. It's mostly that, based on past experience, I'm hesitant about extending a library interface. Once you get users, you have to live with it. So you want to get it right. Having said that, I think in this v2 of the set, the library interface for notmuch_query_count_threads() is sane and complimentary to the existing notmuch_query_count_messages(). (Also quoting IRC: " j4ni: Yes, the interface seems totally reasonable.") Later on, someone might come up with a better implementation, but for now it's already much better than having to iterate and construct the threads. I'll prepare a v3 with some tests and polish. BR, Jani.