1 Return-Path: <meskio@sindominio.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 128D9431FAE
\r
6 for <notmuch@notmuchmail.org>; Wed, 6 Jan 2010 01:59:14 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id p39VFzq-Hvrw for <notmuch@notmuchmail.org>;
\r
11 Wed, 6 Jan 2010 01:59:11 -0800 (PST)
\r
12 Received: from flatline.sindominio.net (flatline.sindominio.net [82.144.4.26])
\r
13 by olra.theworths.org (Postfix) with ESMTP id 8B552431FBC
\r
14 for <notmuch@notmuchmail.org>; Wed, 6 Jan 2010 01:59:11 -0800 (PST)
\r
15 Received: from localhost (localhost.localdomain [127.0.0.1])
\r
16 by flatline.sindominio.net (Postfix) with ESMTP id 0D01234802D;
\r
17 Wed, 6 Jan 2010 10:59:10 +0100 (CET)
\r
18 X-Virus-Scanned: Debian amavisd-new at sindominio.net
\r
19 Received: from flatline.sindominio.net ([127.0.0.1])
\r
20 by localhost (flatline.sindominio.net [127.0.0.1]) (amavisd-new,
\r
22 with ESMTP id a4MiaKrK8HfL; Wed, 6 Jan 2010 10:59:07 +0100 (CET)
\r
23 Received: from blackspot (rpollan-laptop.cern.ch [137.138.192.228])
\r
24 by flatline.sindominio.net (Postfix) with ESMTPA id C02C6348036;
\r
25 Wed, 6 Jan 2010 10:59:03 +0100 (CET)
\r
26 Received: by blackspot (Postfix, from userid 1000)
\r
27 id A8B688BCC3; Wed, 6 Jan 2010 10:08:54 +0100 (CET)
\r
28 Date: Wed, 6 Jan 2010 10:08:54 +0100
\r
29 From: Ruben Pollan <meskio@sindominio.net>
\r
30 To: Carl Worth <cworth@cworth.org>
\r
31 Message-ID: <20100106090854.GA4870@blackspot>
\r
32 References: <20091126202347.GA16654@blackspot>
\r
33 <1260364206-344-1-git-send-email-meskio@sindominio.net>
\r
34 <20091209132446.GC23878@blackspot>
\r
35 <877hsv6hbo.fsf@yoom.home.cworth.org>
\r
36 <87r5qnol78.fsf@yoom.home.cworth.org>
\r
37 <87pr67ofz2.fsf@yoom.home.cworth.org>
\r
38 <20100105153332.GE9339@blackspot>
\r
39 <87637gnxy5.fsf@yoom.home.cworth.org>
\r
41 Content-Type: multipart/signed; micalg=pgp-sha1;
\r
42 protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk"
\r
43 Content-Disposition: inline
\r
44 In-Reply-To: <87637gnxy5.fsf@yoom.home.cworth.org>
\r
45 User-Agent: Mutt/1.5.20 (2009-06-14)
\r
46 Cc: notmuch@notmuchmail.org
\r
47 Subject: Re: [notmuch] [PATCH] Added regress option to tags iterator
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\r
51 List-Id: "Use and development of the notmuch mail system."
\r
52 <notmuch.notmuchmail.org>
\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
56 List-Post: <mailto:notmuch@notmuchmail.org>
\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
60 X-List-Received-Date: Wed, 06 Jan 2010 09:59:14 -0000
\r
64 Content-Type: text/plain; charset=iso-8859-1
\r
65 Content-Disposition: inline
\r
66 Content-Transfer-Encoding: quoted-printable
\r
68 On 11:39, Tue 05 Jan 10, Carl Worth wrote:
\r
69 > Right. So example code using this would be:
\r
71 > for (notmuch_messages_to_first (messages);
\r
72 > notmuch_messages_has_current (messages);
\r
73 > notmuch_messages_to_next (messages))
\r
75 > notmuch_message_t *message;
\r
77 > message =3D notmuch_messages_get_current (messages);
\r
82 > And for iterating in the opposite direction it's very similar:
\r
84 > for (notmuch_messages_to_last (messages);
\r
85 > notmuch_messages_has_current (messages);
\r
86 > notmuch_messages_to_previous (messages))
\r
88 > notmuch_message_t *message;
\r
90 > message =3D notmuch_messages_get_current (messages);
\r
95 > Note that if you couldn't get the iterator to point to an invalid item
\r
96 > before the first, then this second loop would have to look very
\r
99 Yes, make sense like that.
\r
102 I'm not sure what to do about the iterator when is on an invalid item, if y=
\r
104 reach an invalid item doing to_next should be possible to do to_previous to=
\r
106 recover the last valid item? Or is better to force the user to use to_last =
\r
110 In some cases implement to_previous will need to store the previous item=20
\r
111 (actually I did that on the patches I sent).
\r
114 Rub=E9n Poll=E1n | jabber:meskio@jabber.org
\r
115 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=
\r
116 =3D-=3D-=3D-=3D-=3D-
\r
117 =C9sta es la historia de una sociedad que se hunde
\r
118 y mientras cae se repite:
\r
119 hasta ahora todo va bien, hasta ahora todo va bien ...
\r
120 Pero lo importante no es la caida sino el aterrizaje.
\r
124 Content-Type: application/pgp-signature; name="signature.asc"
\r
125 Content-Description: Digital signature
\r
126 Content-Disposition: inline
\r
128 -----BEGIN PGP SIGNATURE-----
\r
129 Version: GnuPG v1.4.10 (GNU/Linux)
\r
131 iEYEARECAAYFAktEUyYACgkQGKOQ92SwNMI4hQCfY/KcOb04q1xJ6DOt2KO38XGo
\r
132 VzMAoJlAhsIhigdBF47knDB9YGbKKvfW
\r
134 -----END PGP SIGNATURE-----
\r
136 --qDbXVdCdHGoSgWSk--
\r