Re: [notmuch] [PATCH] Added regress option to tags iterator
authorCarl Worth <cworth@cworth.org>
Tue, 9 Mar 2010 17:36:10 +0000 (09:36 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:20 +0000 (09:36 -0800)
66/74f98af7eb8166b5613f79bbcd55b6dba9dc9f [new file with mode: 0644]

diff --git a/66/74f98af7eb8166b5613f79bbcd55b6dba9dc9f b/66/74f98af7eb8166b5613f79bbcd55b6dba9dc9f
new file mode 100644 (file)
index 0000000..a881738
--- /dev/null
@@ -0,0 +1,119 @@
+Return-Path: <cworth@cworth.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 6F104476B9A\r
+       for <notmuch@notmuchmail.org>; Tue,  9 Mar 2010 12:02:50 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.022\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.022 tagged_above=-999 required=5\r
+       tests=[ALL_TRUSTED=-1.8, AWL=-0.223, BAYES_50=0.001] autolearn=ham\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id c+b+G5hU0Ks0; Tue,  9 Mar 2010 12:02:49 -0800 (PST)\r
+Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id C0B85476B97;\r
+       Tue,  9 Mar 2010 12:02:49 -0800 (PST)\r
+Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
+       id DE1F954C004; Tue,  9 Mar 2010 09:36:16 -0800 (PST)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: Ruben Pollan <meskio@sindominio.net>, notmuch@notmuchmail.org\r
+In-Reply-To: <87pr67ofz2.fsf@yoom.home.cworth.org>\r
+References: <20091126202347.GA16654@blackspot>\r
+       <1260364206-344-1-git-send-email-meskio@sindominio.net>\r
+       <20091209132446.GC23878@blackspot>\r
+       <877hsv6hbo.fsf@yoom.home.cworth.org>\r
+       <87r5qnol78.fsf@yoom.home.cworth.org>\r
+       <87pr67ofz2.fsf@yoom.home.cworth.org>\r
+Date: Tue, 09 Mar 2010 09:36:10 -0800\r
+Message-ID: <873a09jt2t.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+Subject: Re: [notmuch] [PATCH] Added regress option to tags iterator\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 09 Mar 2010 20:02:50 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Mon, 21 Dec 2009 19:16:49 -0800, Carl Worth <cworth@cworth.org> wrote:\r
+> One option is to just drop the "move_ " prefix. Then everything will be\r
+> a two-word function. So the new proposal is:\r
+>=20\r
+> to_first\r
+> has_current\r
+> to_next\r
+>=20\r
+> to_last\r
+> has_current\r
+> to_previous\r
+>=20\r
+> get_current\r
+>=20\r
+> Better?\r
+\r
+Looking back at this proposal now, (after a long delay), I found I\r
+didn't like it at all. With function names like:\r
+\r
+       notmuch_threads_to_first\r
+       notmuch_threads_to_next\r
+\r
+the missing verb in the name is really distracting. I ended up reading\r
+these names as if they were conversion functions. So I've gone back to\r
+preferring the names with the explicit verbs (even though quite long):\r
+\r
+       notmuch_threads_move_to_first\r
+       notmuch_threads_move_to_next\r
+\r
+Meanwhile, I also decided that _current wasn't adding anything to the\r
+names it showed up in, (we can never "get" anything other than the\r
+current item, so why qualify as "get_current"?). So I'm changing from\r
+"has_current" to "valid", and leaving "get" as it is.\r
+\r
+So the final proposal for iteration in either direction is:\r
+\r
+       move_to_first\r
+        valid\r
+        move_to_next\r
+\r
+       move_to_last\r
+        valid\r
+        move_to_previous\r
+\r
+        get\r
+\r
+I've just pushed commits changing the existing functions (which allow\r
+only forward iteration) to use this naming scheme. I haven't added any\r
+of the reverse-iteration functions yet, so Ruben, if you'd like to do\r
+those within this scheme, that would be find. (Or we could wait until we\r
+have an actual use in mind for them.)\r
+\r
+Thanks,\r
+\r
+=2DCarl\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.10 (GNU/Linux)\r
+\r
+iD8DBQFLlocL6JDdNq8qSWgRAngCAKCOC1FhXomVg/nqQhct0ChFEXj/HgCfRAoj\r
+wJS2YBSFaiEi3Teya+Du/UI=\r
+=l7qE\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r