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 8C5B34196F2 for ; Wed, 14 Apr 2010 10:21:44 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.89 X-Spam-Level: X-Spam-Status: No, score=-2.89 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_MIME_NO_TEXT=0.01] autolearn=ham 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 XBHxBJZblwk4; Wed, 14 Apr 2010 10:21:43 -0700 (PDT) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5BF50431FC1; Wed, 14 Apr 2010 10:21:43 -0700 (PDT) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 02A68568DE1; Wed, 14 Apr 2010 10:21:43 -0700 (PDT) From: Carl Worth To: Dirk Hohndel , notmuch@notmuchmail.org Subject: Re: [PATCH] Next attempt to get guessing of From addresses correct in replies In-Reply-To: References: Date: Wed, 14 Apr 2010 10:21:42 -0700 Message-ID: <87y6gqeyqh.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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: Wed, 14 Apr 2010 17:21:44 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Fri, 09 Apr 2010 15:53:04 -0700, Dirk Hohndel wr= ote: > + * WARNING - if the caller is asking for a header that could occur > + * multiple times than they MUST first call this function with a=20 > + * a value of NULL for header_desired to ensure that all of the > + * headers are parsed and concatenated before a match is returned ... > + } else { > + /* not sure this makes sense for all headers that can occur > + * multiple times, but for now just concatenate headers > + */ > + newhdr =3D strlen(decoded_value); > + hdrsofar =3D strlen(header_sofar); I'm a little nervous about this semantic change. For example, I know that my mail collection contains at least some messages with multiple Message-ID headers, (I'm not sure that's legal, but they are there). I found those when doing detailed comparisons of the database created by sup with that created by very early versions of what became the indexing code for notmuch. [Sup prefers the last-encountered Message-Id in the file, while Notmuch prefers the first.] So I'm concerned about the change above introducing subtle problems that might be hard to notice. How about an argument that asks explicitly for concatenated header values, (and this could just trigger a rescan of the headers and ignore the hash). I think that will be fine for your use case where you're just opening this message file to get this one concatenated header out, right? =2DCarl --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLxfmm6JDdNq8qSWgRAqgDAJ9T4YIhtfzgOrpyc8c+o+Ru0QvmdQCgg90Z 8ADkr/6JZ6jI7Jh96O7ZB7c= =2Wj0 -----END PGP SIGNATURE----- --=-=-=--