Re: muchsync files renames
authorAmadeusz Żołnowski <aidecoe@aidecoe.name>
Tue, 1 Sep 2015 22:52:37 +0000 (23:52 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:28 +0000 (14:49 -0700)
db/fd7606ee2dfdb9f027ea2c127f899d40ba110f [new file with mode: 0644]

diff --git a/db/fd7606ee2dfdb9f027ea2c127f899d40ba110f b/db/fd7606ee2dfdb9f027ea2c127f899d40ba110f
new file mode 100644 (file)
index 0000000..f3f0280
--- /dev/null
@@ -0,0 +1,172 @@
+Return-Path: <aidecoe@aidecoe.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 arlo.cworth.org (Postfix) with ESMTP id 5997B6DE1329\r
+ for <notmuch@notmuchmail.org>; Tue,  1 Sep 2015 15:52:52 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.004\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.004 tagged_above=-999 required=5 tests=[AWL=0.097,\r
+  DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id VOyg3aCieq3h for <notmuch@notmuchmail.org>;\r
+ Tue,  1 Sep 2015 15:52:50 -0700 (PDT)\r
+Received: from jim.zolnowski.name (jim.zolnowski.name [188.116.54.122])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 0AA826DE1226\r
+ for <notmuch@notmuchmail.org>; Tue,  1 Sep 2015 15:52:49 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\r
+ d=aidecoe.name; s=jim;\r
+  h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=vhgQQnGbpXfcbjn5ua5AJV+d7HbrVgbjYasxGwyQFP4=;\r
+  b=knczbbPimt3+1oxoW0ql1igRU9pmckNniIqD4E3nEuZozafqEU9erjj5gekmEl4ms1NJFALOzjsPB1AU+6IQEGB3nXsZDmaFlG9mMP+xLL2YFe56qJYYZqDlD0fXnrcuUtg0OYbi0O4Pjk/laFjZVm8EanNW/wo/GNBJeS44EuLV/cytvQD85mA0PMQZFg4t83/gYwyjRIayeIQcHQb/VlD0uVT8DwamsH73grd0MX85ApQQQ3U15M+hRVuvEagBIu8dG7j8U0W7HLHjtwwVhzopP4wsCAZcSNIi/GhttxBrpdGZ2KQ3zcEHwRI/6M8gmTL4ELh4XKekYydMaOzoqA==;\r
+Received: from cpc3-cmbg17-2-0-cust294.5-4.cable.virginm.net ([86.22.65.39]\r
+ helo=localhost)\r
+ by jim.zolnowski.name with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256)\r
+ (Exim 4.85) (envelope-from <aidecoe@aidecoe.name>)\r
+ id 1ZWuPy-0006K1-RC; Wed, 02 Sep 2015 00:52:43 +0200\r
+From: Amadeusz =?utf-8?B?xbtvxYJub3dza2k=?= <aidecoe@aidecoe.name>\r
+To: David Mazieres expires 2015-11-29 PST\r
+ <mazieres-sggp47c7j46624db3rharctcei@temporary-address.scs.stanford.edu>\r
+Subject: Re: muchsync files renames\r
+In-Reply-To: <878u8rvxap.fsf@ta.scs.stanford.edu>\r
+References: <878u93ujdo.fsf@freja.aidecoe.name>\r
+ <876146o920.fsf@ta.scs.stanford.edu> <871teu8kdd.fsf@freja.aidecoe.name>\r
+ <87oahxojlv.fsf@ta.scs.stanford.edu> <87vbbwnbb4.fsf@freja.aidecoe.name>\r
+ <87io7wr50y.fsf@ta.scs.stanford.edu> <87k2sbmzww.fsf@freja.aidecoe.name>\r
+ <87oahnmkqf.fsf@ta.scs.stanford.edu> <87egijm7kw.fsf@freja.aidecoe.name>\r
+ <878u8rvxap.fsf@ta.scs.stanford.edu>\r
+User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Tue, 01 Sep 2015 23:52:37 +0100\r
+Message-ID: <87613tn45m.fsf@freja.aidecoe.name>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+ micalg=pgp-sha512; protocol="application/pgp-signature"\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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, 01 Sep 2015 22:52:52 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+Hi David,\r
+\r
+David Mazieres <dm-list-email-notmuch@scs.stanford.edu> writes:\r
+> Let's just make sure I understand:  Your mail starts out like this:\r
+>\r
+>     Path:  spam/new/nnn.MnnnPnnnQnRn.machine\r
+>     Tags:  new\r
+>\r
+> Then you run afew, and afew runs\r
+>\r
+>     notmuch tag -new +spam <message-ID>\r
+>\r
+> You are saying that that even though maildir.synchronize_tags is true,\r
+> you end up with:\r
+>\r
+>     Path:  spam/new/nnn.MnnnPnnnQnRn.machine\r
+>     Tags:  spam\r
+\r
+Yes.\r
+\r
+\r
+> That's a little surprising, because the next time you run "notmuch new,"\r
+> I would have expected it to add the unread flag based on the pathname.\r
+\r
+What's more surprising is that there is a test case in notmuch test\r
+suite which test whether after modifing tag of a mail it is moved from\r
+new/ to cur/. Yes, it should be moved on any tag modification if I\r
+understand correctly. But it seems it does not for my maildirs...\r
+\r
+$ notmuch search --output=3Dfiles thread:00000000000108bf\r
+/home/aidecoe/Mail/aidecoe/2015/new/1441022521.M714465P23412V000000000000FE=\r
+04I0000000000141A38_0.freja,S=3D53857\r
+$ notmuch search thread:00000000000108bf\r
+thread:00000000000108bf  Yest. 11:58 [1/1] Somebody; Subject (reklama unrea=\r
+d)\r
+$ notmuch tag +hey thread:00000000000108bf\r
+$ notmuch search thread:00000000000108bf\r
+thread:00000000000108bf  Yest. 11:58 [1/1] Somebody; Subject (hey reklama u=\r
+nread)\r
+$ notmuch search --output=3Dfiles thread:00000000000108bf\r
+/home/aidecoe/Mail/aidecoe/2015/new/1441022521.M714465P23412V000000000000FE=\r
+04I0000000000141A38_0.freja,S=3D53857\r
+\r
+\r
+> Then it will add the unread tag to the Xapian database.  But maybe if it\r
+> finds a file in the new folder it doesn't add the unread flag.\r
+\r
+Might be.\r
+\r
+\r
+> But why does notmuch_message_tags_to_maildir_flag() then feel the need\r
+> to rename the file when muchsync calls it.  Muchsync should ideally\r
+> behave exactly the same as the notmuch tag command.  Specifically, when\r
+> muchsync receives a new file from the server, it does the following:\r
+>\r
+>  1. create file in same directory as the server (presumably spam/new)\r
+>\r
+>  2. Call the following functions on this file:\r
+>       notmuch_database_add_message()\r
+>       notmuch_message_freeze()\r
+>       notmuch_message_remove_all_tags()\r
+>       notmuch_message_add_tag() for each tag in new.tags\r
+>       if (synchronize_tags) notmuch_message_tags_to_maildir_flag()\r
+>       notmuch_message_thaw()\r
+>\r
+>  3. get the current tags of the message from the server (presumably just\r
+>     spam)\r
+>\r
+>  4. Call the following functions on the Message-ID:\r
+>       notmuch_message_freeze()\r
+>       notmuch_message_remove_all_tags()\r
+>       notmuch_message_add_tag() for each tag sent *by the server*\r
+>       if (synchronize_tags) notmuch_message_tags_to_maildir_flag()\r
+>       notmuch_message_thaw()\r
+\r
+So for some reason in my maildirs mails are not moved from new/ to cur/\r
+on tag manipulation, but they are on client side by muchsync.  I will\r
+have to investigate why this happens to me.\r
+\r
+\r
+=2D-=20\r
+Amadeusz =C5=BBo=C5=82nowski\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v2.1\r
+\r
+iQJ8BAEBCgBmBQJV5iw1XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w\r
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCMzcyRTFENjI5NUM1MzYwQTQwODQyRUZD\r
+QkNDODAyM0Y1OUUxNzA0AAoJEMvMgCP1nhcExfUP/2oRePjDcI+XXfvxzvN6Knbv\r
+JZgUF20evMpb5UhUW+4EJFpjE6GBiyY+RopbGduTHbf1eGGCNd6e4P2NlAVyZMcO\r
+YZeluU+upeH47w5qYacRKOTcq6+UIvsHsArLSgYCR1eV9RIMcZ/7sj83KDc8CNY8\r
+uIunRoCn9Xpfm9QsnbfxzY3Vr4TqsvHaHc21MbjLk7ccNvTBYJqxtT+xZIZ5oxf4\r
+bKzIxiPQnZYUTE60y9mk+PWHEMBIJZVLoMYPaK4v16LZf6jPP1i+WUvAHZLBYH04\r
+lbEeQ42FMMBM71cWIz1kGwq0MQEEhMcsAq/Vlo8dIko873gkO5X3kgnaLleKzx66\r
+VyQB9DwF2sewht844u0rYaJfCpLpy6Lz3JH0g/wcWD41LiakycFOudIGFem4tO7i\r
+pvfpCXS4nXFOqoRF+anT3aegM2KTcDzDDYRuJ3bXinxevfwUWb1583RkRvPSJw/p\r
++lWJxuFb9wSQLtR+JBHAs6yfyoYywc5F4xeJck3Xryyp0HOU6sBTjcO5L5iQjUQB\r
+HWkCX+y/q4wtaL/u5+RxUsDprUD5GlKAnhpXVaNJ3wWZjqyn18Gp8n0QkeAROjfU\r
+qy51gKONHzwtiVDoa9cduArdLocHH5cMNOceKqh+HeB5+LG84JkRV/46p9tZ96PB\r
+LawSmgryk//VneCkeky4\r
+=tHzz\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r