From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 764D5431FC7 for ; Wed, 27 Jan 2010 11:00:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.095 X-Spam-Level: X-Spam-Status: No, score=-0.095 tagged_above=-999 required=5 tests=[AWL=0.903, BAYES_50=0.001, RCVD_IN_DNSWL_LOW=-1, UNPARSEABLE_RELAY=0.001] 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 5q7O2m-dXFzQ for ; Wed, 27 Jan 2010 11:00:01 -0800 (PST) Received: from mx1.riseup.net (mx1.riseup.net [204.13.164.18]) by olra.theworths.org (Postfix) with ESMTP id C3FD6431FAE for ; Wed, 27 Jan 2010 11:00:01 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: micah@mx1.riseup.net) with ESMTPSA id E0B4125F69C Received: by lillypad (Postfix, from userid 1000) id 39AA52CC063; Wed, 27 Jan 2010 10:56:01 -0500 (EST) From: micah anderson To: Andreas =?iso-8859-1?q?Kl=F6ckner?= , notmuch@notmuchmail.org In-Reply-To: <200912141421.52561.lists@informa.tiker.net> References: <200912141421.52561.lists@informa.tiker.net> Date: Thu, 28 Jan 2010 04:55:55 +1300 Message-ID: <87ljfjfsok.fsf@lillypad.riseup.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Virus-Scanned: clamav-milter 0.95.3 at mx1 X-Virus-Status: Clean Subject: Re: [patch] store folder information 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, 27 Jan 2010 19:00:04 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Hi Andreas, I'm just writing because of the patch you sent to the notmuch list on December 15th. It seems like many people are wanting this functionality, I know I am myself and Carl has also indicated the same. However, there were a couple of minor suggestions for improvements for your patch that have not seen a reply from you yet. I'm particularly eager to see this get accepted upstream, and it sounds like the changes necessary to do so are relatively minor. I'm wondering what your plans are for addressing these issues? I've come to depend on this functionality, and would love to see it incorporated upstream!=20 Specifically these were: 1. Unrelated whitespace: On December 16th,2009 Ruben Pollan wrote: > [meskio@blackspot:src/notmuch.orig]$ git apply ~/0001-Preseve-folder-info= rmation-when-indexing.patch > /home/meskio/0001-Preseve-folder-information-when-indexing.patch:136: tra= iling whitespace. > status notmuch_database_add_message (notmuch, next, > /home/meskio/0001-Preseve-folder-information-when-indexing.patch:137: tra= iling whitespace. > folder_base_name, > warning: 2 lines add whitespace errors. > > It's just whitespaces at the end of the lines. 2. An unrelated hunk creeping in: On Tue, 15 Dec 2009 13:22:19 -0800, Carl Worth wrote: > On Mon, 14 Dec 2009 14:21:50 -0500, Andreas Kl=3DC3=3DB6ckner wrote: > > > > @@ -116,6 +116,8 @@ skip_re_in_subject (const char *subject) > > s++; > > if (strncasecmp (s, "re:", 3) =3D3D=3D3D 0) > > s +=3D3D 3; > > + else if (strncasecmp (s, "aw:", 3) =3D3D=3D3D 0) > > + s +=3D3D 3; > > else > > break; > > } >=3D20 > This hunk looks unrelated to the rest. Could you submit that separately, > please? 3. Redundant trailing directory name traversal: > > + gchar *full_folder_name =3D3D NULL; > > + gchar *folder_base_name =3D3D NULL; > > + > > + /* Find name of "folder" containing the email. */ > > + full_folder_name =3D3D g_strdup(path); > > + while (1) > > + { > > + folder_base_name =3D3D g_path_get_basename(full_folder_name); > > The trailing directory name is available already during the > traversal. So you don't need to search it back out again. See the patch > in the following message: > > id:87fx8bygi7.fsf@linux.vnet.ibm.com > > which simply passes the trailing directory name along, (but skipping a > name of "cur" or "new" while traversing). 4. supporting hierarchical folders (perhaps this is a later improvement that does not need to be added before the original patch is accepted?): > Beyond that, though, I imagine some people have hierarchical folders as > well, so it probably makes sense to store them as well. > > To do that, it's probably just a matter of calling gen_terms on the > complete filename. I haven't tested, but doing that should allow > Xapian's phrase searching to do the right thing for something like: > > filename:portion/of/the/path/name 5. Probably the patch needs to be rebased off of master at this point. Micah --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCgAGBQJLYGIMAAoJEIy/mjIoYaeQxogP/2AV4t+6G50aqwKs9EAY9Ewq PRY75DLhuBbf5pYi6/s8eurMhtYDRZIuc1E9XgDc5goAE9vLuQQ2I2qwKIdVJFbt mv5gcLzE9VjVa+W0rvxQTFxIAGbDNZ4EuWs6ajl9uvrmioCTvXH0pP7CQ5bWckuX /jJr28w1JjgMiP6Wz9PQ5JCxg7WSgsTxsqv2XskR+J9XHjJiSAQdr7lhLsBUUZjY nqcgvC5YbmGwaJkFpmEWcb9gKp+QjyTJ3hpQJDfOyst/+CzL99Z1Dw6ODKq+98sf 0AxixzleGhaIVush4wKI1IYI7l6x3YBHAMVFE42fyJqKBazO8VGCULUMsOwBSk01 Bh5iaOTrW5NwAUfvsjKsBvYZhcszMvmRkfINfoRAs3G4DziJ2QmDScwBDVfWYR/5 7sqLHRBPsyoogC+HonNk0hKy3BjfYZZWZr74M7Z2Vi44BR3ATlbxxxvGwSx6S9ig k1LjzGz4WOax35Q4TntrdbVV7IDyBafpy7mBgavm9x5kAcCjbk/auFrFZESzmTjZ zDB4/ea7g8tJp6Ky2Q6YkzZrh5B6FjV7HQf3cxQuutgaXX2fcexJTflxubGJZYBx 2VmYVveKTgFtGJFGxyH8MIxLlBHohascFDTN3uO5bEbZYf3QYQx6mTI19IB9+4k8 BsFiJMOulwjoLJ5rEqtm =Oye4 -----END PGP SIGNATURE----- --=-=-=--