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 99192431FD0 for ; Mon, 31 Oct 2011 14:44:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.29 X-Spam-Level: X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 vT0FPhfvPxpB for ; Mon, 31 Oct 2011 14:44:37 -0700 (PDT) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id 05FFD431FB6 for ; Mon, 31 Oct 2011 14:44:37 -0700 (PDT) Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) by earth-doxen-postvirus (Postfix) with ESMTP id 884A766E02C3; Mon, 31 Oct 2011 14:44:36 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new Received: from finestructure.net (gwave-114.ligo.caltech.edu [131.215.114.114]) (Authenticated sender: jrollins) by earth-doxen-submit (Postfix) with ESMTP id 63EB266E0198; Mon, 31 Oct 2011 14:44:32 -0700 (PDT) Received: by finestructure.net (Postfix, from userid 1000) id 408BE4C3; Mon, 31 Oct 2011 14:44:32 -0700 (PDT) From: Jameson Graef Rollins To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [RFC PATCH v2 0/3] lib/cli/emacs: limit number of messages in search results In-Reply-To: References: User-Agent: Notmuch/0.9+39~g74c9dba (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 31 Oct 2011 14:44:29 -0700 Message-ID: <87fwi86dky.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Cc: amdragon@mit.edu 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: Mon, 31 Oct 2011 21:44:37 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 31 Oct 2011 23:18:07 +0200, Jani Nikula wrote: > Hi, this is an iteration of id:"cover.1319833617.git.jani@nikula.org" add= ressing > comments on the list and IRC. Main changes: >=20 > * Results are now limited based on threads (not messages) for thread and = summary > output. This is accomplished with a new lib function to count the numbe= r of > threads in matching messages. >=20 > * cli part is now inspired by James Vasile's patch > id:"8739gyw0zh.fsf@opensourcematters.org", with the additional ability = to > limit from the end of result set. >=20 > * Bugs reported by Daniel Schoepe fixed. >=20 > * Don't show buttons if everything is visible already. >=20 > I'm still marking it as RFC. It works for me, but patch 1 might be deemed > unacceptable. Hi, Jani. Thanks for working on this. This should also be valuable for vim users. In order to push forward with this, though, I think we really need to have a complete unit test for this new functionality. We usually like to see units tests that describe and then test for the new functionality you wish to add, followed by the patches that provide the new functionality. Lots of good tests for new functionality being proposed here shouldn't be too difficult to work out ahead of time. For instance, here's an example of a test that I would like to see: test_begin_subtest "maxitems does the right thing" notmuch search tag:foo | head -n 20 >expected notmuch search --maxitems=3D20 tag:foo >output test_expect_equal_file expected output test_begin_subtest "concatenation of limited searches does the right thing" notmuch search tag:foo | head -n 20 >expected notmuch search --maxitems=3D10 tag:foo >output notmuch search --maxitems=3D10 --first=3D10 tag:foo >>output test_expect_equal_file expected output jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJOrxa9AAoJEO00zqvie6q8Yr8QALccRpFWhrkKtMw7qPhjlmVE TBIWnNLXJYnO1YnaHhl90ebaizsV6b+3Cql6BD40V6yflisAUICr196FSXvsqo3q 6fS0UoS65OLZNKL0EUmQp00BxKGsuJWyHfLVWZixMPnzGiLcrRJbzn8C0S2UWbVN cqMGyarjD4SJbLzqNAXyV9MACUavZ8npKoNa4dpaieB/54sYYxyzjvnnAnQi1012 764DNWAJcwUB4EbNuMpmtOfyqve23dHhOVGRwB2qAZBYdFIkRvNig3ONx2tzvX9x x2DxoXKWu3NKnn5OX1u96HGIWT08/2ZqUvfkB8J6zOCrT1pt7b4nNfvrZPxEAEVl E1grle3Bd0p+NjxBEJTfJhQ3LGS6bzP4Y1Jtwmg5/VtxPQeuh1ouqq9pfRGcdV4e DMVnk8WG9YyCdcGiBXxz31zy6rHcO6+1JebRD/pnjyoDURd6jdIiBKHNou6uM2TM lxkoWC5i3wQk4OMxZvC2BKz38pAmambUD+M9rJeOpQv3FGnBaSPYJCT+cRA3X8JT laV6gthcoOig/Vo6t8pUYxy5XI5sRzPjTyGskUT+c0ea+VXSx6DhZLliQqYzDwSj FDVAmRz9WgFEdY89EwRymNTODfPE/Z/q8Mr6Il0U496rCBp4jkGAUceBp/KcNLX4 dmYUYoQLHfgkQT9BsPFn =X+DZ -----END PGP SIGNATURE----- --=-=-=--