Re: [notmuch] [PATCHv2] Preserve folder information when indexing
authormicah anderson <micah@riseup.net>
Tue, 2 Feb 2010 21:31:38 +0000 (16:31 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:05 +0000 (09:36 -0800)
ee/f6ca26d061f3072662468b31d020bd37928ab1 [new file with mode: 0644]

diff --git a/ee/f6ca26d061f3072662468b31d020bd37928ab1 b/ee/f6ca26d061f3072662468b31d020bd37928ab1
new file mode 100644 (file)
index 0000000..fadeaa6
--- /dev/null
@@ -0,0 +1,139 @@
+Return-Path: <micah@riseup.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 A20A7431FBD\r
+       for <notmuch@notmuchmail.org>; Tue,  2 Feb 2010 13:31:27 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.305\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.305 tagged_above=-999 required=5 tests=[AWL=0.324,\r
+       BAYES_50=0.001, NUMERIC_HTTP_ADDR=0.001, RCVD_IN_DNSWL_LOW=-1,\r
+       UNPARSEABLE_RELAY=0.001, URI_HEX=0.368] autolearn=no\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 EbLjDPLQ7j1r for <notmuch@notmuchmail.org>;\r
+       Tue,  2 Feb 2010 13:31:27 -0800 (PST)\r
+Received: from mx1.riseup.net (mx1.riseup.net [204.13.164.18])\r
+       by olra.theworths.org (Postfix) with ESMTP id 2AAD4431FAE\r
+       for <notmuch@notmuchmail.org>; Tue,  2 Feb 2010 13:31:27 -0800 (PST)\r
+Received: from [127.0.0.1] (localhost [127.0.0.1])\r
+       (Authenticated sender: micah@mx1.riseup.net)\r
+       with ESMTPSA id 0076A25E750\r
+Received: by lillypad (Postfix, from userid 1000)\r
+       id 3C1435209A1; Tue,  2 Feb 2010 16:31:50 -0500 (EST)\r
+From: micah anderson <micah@riseup.net>\r
+To: Jameson Rollins <jrollins@finestructure.net>, Arvid Picciani\r
+       <aep@exys.org>, notmuch@notmuchmail.org\r
+In-Reply-To: <873a1jebve.fsf@servo.finestructure.net>\r
+References: <201001291049.21048.sojkam1@fel.cvut.cz>\r
+       <1265122868-12133-1-git-send-email-sojkam1@fel.cvut.cz>\r
+       <87eil3ehjh.fsf@servo.finestructure.net> <4B686569.7030408@exys.org>\r
+       <873a1jebve.fsf@servo.finestructure.net>\r
+Date: Tue, 02 Feb 2010 16:31:38 -0500\r
+Message-ID: <87r5p3l3yd.fsf@lillypad.riseup.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha512; protocol="application/pgp-signature"\r
+X-Virus-Scanned: clamav-milter 0.95.3 at mx1\r
+X-Virus-Status: Clean\r
+Subject: Re: [notmuch] [PATCHv2] Preserve folder information when indexing\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, 02 Feb 2010 21:31:27 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Tue, 02 Feb 2010 13:22:29 -0500, Jameson Rollins <jrollins@finestructure=\r
+.net> wrote:\r
+> I'm starting to think that maybe the folder: field is not the right way\r
+> to do this, though.  What if a message moves?=20=20\r
+\r
+The easiest way to answer this question is to try it. I did that, and\r
+things didn't work as expected. I expected that once the message was\r
+moved to a different folder, and 'notmuch new' was run, then the folder\r
+search result would move with the message move.=20\r
+\r
+I tried to move a message from folder 'thinkpad' to folder 'Junk':\r
+\r
+1. First I did a search that included the thinkpad folder, with a string\r
+I know is in an email:\r
+\r
+$ notmuch search folder:thinkpad 05K9519\r
+thread:4ba02e2c665b09fb74dc6f1b6ea3aac2   2004-02-25 [1/1] J H. Maut; RE: [=\r
+Thinkpad] thinkpad 600e LCD quesiton (thinkpad unread)\r
+\r
+2. then I moved that email to my Junk folder and ran notmuch new:\r
+\r
+$ mv INBOX.thinkpad/new1147465172.M760586P11592V0000000000000301I00141D45_7=\r
+229.um\,S\=3D2421\:2\,S INBOX.Junk/new\r
+$ notmuch new\r
+Processed 1 file in almost no time.=20=20=20=20=20=20=20=20=20=20=20=20=20=\r
+=20=20=20=20=20=20=20\r
+No new mail. Detected 1 file rename.\r
+\r
+3. then I tried to repeat the search I did in #1, searching for the\r
+folder thinkpad and the string, and it still returns the result (this is\r
+not expected! I would expect no result returned):\r
+\r
+$ notmuch search folder:thinkpad 05K9519\r
+thread:4ba02e2c665b09fb74dc6f1b6ea3aac2   2004-02-25 [1/1] J H. Maut; RE: [=\r
+Thinkpad] thinkpad 600e LCD quesiton (thinkpad unread)\r
+\r
+4. If i try and search for the same message in the Junk folder, I get no\r
+results:\r
+\r
+$ notmuch search folder:Junk 05K9519\r
+$=20\r
+\r
+5. If I do a show on the message, I see that notmuch knows that the\r
+file is actually in the Junk folder:\r
+\r
+$ notmuch show thread:4ba02e2c665b09fb74dc6f1b6ea3aac2\r
+\r
+message{ id:BKEJKEHBAJJAFLAGIHJCGEEEECAA.J.H.Maut@somewhere.net depth:0 mat=\r
+ch:1 filename:/home/micah/Maildir/Personal/INBOX.Junk/new/1147465172.M76058=\r
+6P11592V0000000000000301I00141D45_7229.um,S=3D2421:2,S\r
+\r
+\r
+> Only new mails are having this field modified, so if messages are\r
+> moved that field is not modified, and since it's being added as part\r
+> of the message (like "subject:") it's not modifiable.=20=20\r
+\r
+Exactly the problem.\r
+\r
+micah\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.10 (GNU/Linux)\r
+\r
+iQIcBAEBCgAGBQJLaJm+AAoJEIy/mjIoYaeQfNgQAJ81buhFdgK0LHqNBFxhjRUb\r
+02GcYhQntN9V2y44WcwtLZ3DdJ4QnHo6h0ppwMsJ8GTyMQhSV4P7kobkpYqZlYu7\r
+rZz2Cvq4hjUY2Ync7bDnGRLAZoR0rmMP8c3aF8EDfWGlTPkC/Bqn1di/pKWDfBoc\r
+dD7UT2JcqVcWFqVt50vpLZrjpFLHXKVYwt8wQYxyLd1TQg/dfoss9q6gAgtKCjFv\r
+K1enNr4YLfQdA4+XVvx1E/P/8fydwp0k3YU5XDMs11M3roZuQOKUWcK7knhkmK2x\r
+PuG9f6a039flgFyn0GsUyLKQeZYnO5/dGUf5LbIUXhOYCKUAq1wDXat7XuCzNTU+\r
+fAdN8eLbHQrvXeSY2upt3BunL2YVXsuSQw9kZFsoqJtY791hRioQOHgo2SqtOBZZ\r
+Ig//XhwwnWtiWG/+BYcWXa5UzSusK0WjjoJUdbYDQncp+gnyndpMEc6zY/ssUNEB\r
+6064KEZQlhjFN/x3xLHmFsAq3c5MekU5FZ6Ehh0mPd0odxqMM67WIvDqgsiRUTXM\r
+8/GLgb0krdBSdPut5TgaH+zefpq76NkeJFI0/5+cKzkbCUYLM46QnYUs+jChcJDK\r
+tBePORHgrgij/hbdEHj+FchS153rr21VVMHkBiH2juWDNWpIbj0imy5MDZEuhhS+\r
+HIrXOOjR8gh/Y6aP7gZZ\r
+=KeuH\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r