--- /dev/null
+Return-Path: <raorn@raorn.name>\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 7B739431FBC\r
+ for <notmuch@notmuchmail.org>; Tue, 30 Apr 2013 02:52:15 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.363\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.363 tagged_above=-999 required=5\r
+ tests=[RDNS_DYNAMIC=0.363] autolearn=disabled\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 2T4VW-4anzlh for <notmuch@notmuchmail.org>;\r
+ Tue, 30 Apr 2013 02:52:11 -0700 (PDT)\r
+Received: from mail.raorn.name (c2-81-23-10-117.elastic.cloud.croc.ru\r
+ [81.23.10.117])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id E538E431FAF\r
+ for <notmuch@notmuchmail.org>; Tue, 30 Apr 2013 02:52:10 -0700 (PDT)\r
+Received: by mail.raorn.name (Postfix, from userid 500)\r
+ id 340C219A; Tue, 30 Apr 2013 13:52:14 +0400 (MSK)\r
+Date: Tue, 30 Apr 2013 13:52:14 +0400\r
+From: "Alexey I. Froloff" <raorn@raorn.name>\r
+To: David Bremner <david@tethera.net>\r
+Subject: Re: [PATCH] lib: Add a new prefix "list" to the search-terms syntax\r
+Message-ID: <20130430095213.GA2861@raorn.name>\r
+References: <20130409083010.GA27675@raorn.name>\r
+ <1365549369-12776-1-git-send-email-raorn@raorn.name>\r
+ <87vc74vn2n.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; micalg=pgp-sha1;\r
+ protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH"\r
+Content-Disposition: inline\r
+In-Reply-To: <87vc74vn2n.fsf@zancas.localnet>\r
+User-Agent: Mutt/1.5.21 (2010-12-30)\r
+Cc: notmuch@notmuchmail.org\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, 30 Apr 2013 09:52:15 -0000\r
+\r
+\r
+--ReaqsoxgOBHFXBhH\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Mon, Apr 29, 2013 at 10:12:16PM -0300, David Bremner wrote:\r
+> > + begin_list_id =3D strrchr (list_id_header, '<');\r
+> > + if (!begin_list_id) {\r
+> > + fprintf (stderr, "Warning: Not indexing mailformed List-Id tag.\n");\r
+> > + return;\r
+> > + }\r
+> - I guess this should say "malformed".=20\r
+My bad. English is not my native language ;-)\r
+\r
+> - I got about 1800 lines of such messages when indexing 280k\r
+> messages. That might strike some people as excessive. On the otherhand\r
+> I guess we need to re-think error reporting overall.\r
+If I understand correctly, this code belongs to library and\r
+should not print anything neither on stderr nor stdout. OTOH,\r
+surrounding functions do print messages on error, so I just did\r
+as other do.\r
+\r
+> What do you think about printing filename or message-id here its\r
+> easier to double check that it is not a bug?\r
+Giving Message-Id makes sense.\r
+\r
+> > + void *local =3D talloc_new (message);\r
+> we should handle ENOMEM here, I think.\r
+There are 16 talloc_new() calls and ENOMEM is not handled\r
+anywhere.\r
+\r
+> > + /* _notmuch_message_add_term() may return\r
+> > + * NOTMUCH_PRIVATE_STATUS_TERM_TOO_LONG here. We can't fix it, but\r
+> > + * this is not a reason to exit with error... */\r
+> > + if (_notmuch_message_add_term (message, "list", list_id))\r
+> > + fprintf (stderr, "Warning: Not indexing List-Id: <%s>\n", list_id);\r
+> This should say why the indexing failed.\r
+There should be strerror-like function, then can give description\r
+for a given status code.\r
+\r
+> - We need a couple tests for this code; tests/search should give some\r
+> hints how to proceed.\r
+OK\r
+\r
+> - We need a patch for NEWS, explaining what people need to do take\r
+> advantage of the new functionality. I think that adding new prefixes\r
+> to an existing database is OK, but I'd welcome confirmation.\r
+OK\r
+\r
+--=20\r
+Regards, --\r
+Sir Raorn. --- http://thousandsofhate.blogspot.com/\r
+\r
+--ReaqsoxgOBHFXBhH\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: Digital signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iQEcBAEBAgAGBQJRf5RKAAoJEBd6rh2Yq9Fr+3oIAMSFO6LGdtIkmsZ0z9PSRMFP\r
+txbmq0ZIfyHrfUpre/UGDHUPhjX3n9lBMeKYcNMEO4OiswbeCr071+2AK81ZCK4a\r
+e9cBK3VdjX9Gqi58RNqfzCw4IZJfveumeQskxx9z4PFDEgl9uBQbfuc51bEj/KAA\r
+YpazoXtnhisG2UT0bO+WndbxvnGHgRb9jY1bukMjwHYVLV4f5gZ06ZGRMtXkBBjm\r
+r76BNRMx/G/h173R0t89whRsECug3HW7raPOnaeZGrKbY3e9gGn+6+4x08YynXwJ\r
+PyBjREDykmLHHEXAziDq9AjxoirdF8Er2M5dvMec0VYqSv7VmEYpXaw9ohOE0us=\r
+=kGWo\r
+-----END PGP SIGNATURE-----\r
+\r
+--ReaqsoxgOBHFXBhH--\r