Re: [notmuch] notmuch_threads_back and notmuch_messages_back
authorRuben Pollan <meskio@sindominio.net>
Sun, 6 Dec 2009 17:34:37 +0000 (18:34 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:50 +0000 (09:35 -0800)
a3/93a0b62472ea3db097f88f97a022319b1aa941 [new file with mode: 0644]

diff --git a/a3/93a0b62472ea3db097f88f97a022319b1aa941 b/a3/93a0b62472ea3db097f88f97a022319b1aa941
new file mode 100644 (file)
index 0000000..46c0ea3
--- /dev/null
@@ -0,0 +1,135 @@
+Return-Path: <meskio@sindominio.net>\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 74C0F431FAE\r
+       for <notmuch@notmuchmail.org>; Sun,  6 Dec 2009 09:32:39 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\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 2uvjK5UINMo7 for <notmuch@notmuchmail.org>;\r
+       Sun,  6 Dec 2009 09:32:37 -0800 (PST)\r
+Received: from flatline.sindominio.net (flatline.sindominio.net [82.144.4.26])\r
+       by olra.theworths.org (Postfix) with ESMTP id 65376431FBC\r
+       for <notmuch@notmuchmail.org>; Sun,  6 Dec 2009 09:32:37 -0800 (PST)\r
+Received: from localhost (localhost.localdomain [127.0.0.1])\r
+       by flatline.sindominio.net (Postfix) with ESMTP id 9010D262AC6;\r
+       Sun,  6 Dec 2009 18:32:35 +0100 (CET)\r
+X-Virus-Scanned: Debian amavisd-new at sindominio.net\r
+Received: from flatline.sindominio.net ([127.0.0.1])\r
+       by localhost (flatline.sindominio.net [127.0.0.1]) (amavisd-new,\r
+       port 10024)\r
+       with ESMTP id xK4jWHdWtClY; Sun,  6 Dec 2009 18:32:31 +0100 (CET)\r
+Received: from blackspot (115.182.192-77.rev.gaoland.net [77.192.182.115])\r
+       by flatline.sindominio.net (Postfix) with ESMTPA id 1651A262B5F;\r
+       Sun,  6 Dec 2009 18:32:31 +0100 (CET)\r
+Received: by blackspot (Postfix, from userid 1000)\r
+       id BF1318BC37; Sun,  6 Dec 2009 18:34:37 +0100 (CET)\r
+Date: Sun, 6 Dec 2009 18:34:37 +0100\r
+From: Ruben Pollan <meskio@sindominio.net>\r
+To: Carl Worth <cworth@cworth.org>\r
+Message-ID: <20091206173437.GD5109@blackspot>\r
+References: <20091126202347.GA16654@blackspot>\r
+       <87pr73jo6w.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; micalg=pgp-sha1;\r
+       protocol="application/pgp-signature"; boundary="iVCmgExH7+hIHJ1A"\r
+Content-Disposition: inline\r
+In-Reply-To: <87pr73jo6w.fsf@yoom.home.cworth.org>\r
+User-Agent: Mutt/1.5.20 (2009-06-14)\r
+Cc: notmuch@notmuchmail.org\r
+Subject: Re: [notmuch] notmuch_threads_back and notmuch_messages_back\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\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: Sun, 06 Dec 2009 17:32:39 -0000\r
+\r
+\r
+--iVCmgExH7+hIHJ1A\r
+Content-Type: text/plain; charset=iso-8859-1\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On 19:57, Fri 27 Nov 09, Carl Worth wrote:\r
+> (I'd like a verb that pairs better\r
+> with "advance" than the non-verb "back"---any suggestions)?\r
+\r
+What about regress?\r
+I'm not a native English speaker, so maybe someone can suggest something be=\r
+tter.\r
+\r
+> So those won't need any new code. The one case that will need new code\r
+> is that for notmuch_message_get_replies and\r
+> notmuch_message_get_toplevel_messages the messages iterator is currently\r
+> built on a singly-linked list. Making it doubly linked would obviously\r
+> not be hard though.\r
+\r
+I'm trying to convert it to a doubly linked list, but I'm not sure if I\r
+understand well how they work.\r
+\r
+I don't see how _notmuch_message_list_append works. It says "node can of co=\r
+urse\r
+point to an arbitrarily long list of nodes", but the code is:\r
+\r
+void\r
+_notmuch_message_list_append (notmuch_message_list_t *list,               =\r
+=20\r
+                  notmuch_message_node_t *node)                           =\r
+=20\r
+{  =20\r
+    *(list->tail) =3D node;\r
+    list->tail =3D &node->next;\r
+}\r
+\r
+Should not be something like:\r
+\r
+void\r
+_notmuch_message_list_append (notmuch_message_list_t *list,               =\r
+=20\r
+                  notmuch_message_node_t *node)                           =\r
+=20\r
+{  =20\r
+    notmuch_message_node_t *next_node;\r
+\r
+    *(list->tail) =3D node;\r
+       for (next_node =3D node->next; next_node->next !=3D NULL;\r
+            next_node =3D next_node->next);\r
+       list->tail =3D &next_node->next;\r
+}\r
+\r
+Do I miss something? Or the function is just designed to work on a single n=\r
+ode\r
+not a list of them?\r
+\r
+\r
+--=20\r
+Rub=E9n Poll=E1n  | jabber:meskio@jabber.org\r
+-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=\r
+=3D-=3D-=3D-=3D-=3D-\r
+         No vamos a reivindicar nada,\r
+            no vamos a pedir nada.\r
+            Tomaremos, okuparemos.\r
+\r
+--iVCmgExH7+hIHJ1A\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: Digital signature\r
+Content-Disposition: inline\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.10 (GNU/Linux)\r
+\r
+iEYEARECAAYFAksb6y0ACgkQGKOQ92SwNMKMgwCZAWxxhi/Q7JmGP9Ei8jNdn+tf\r
+OVoAmQE3utGJsdC8wH3KkkmpFPfZD/Ue\r
+=Rfin\r
+-----END PGP SIGNATURE-----\r
+\r
+--iVCmgExH7+hIHJ1A--\r