Re: [PATCH 1/2] lib: Add back the synchronization of 'T' flag with deleted tag.
authorAntoine Beaupré <anarcat@koumbit.org>
Tue, 17 Jan 2012 05:12:36 +0000 (00:12 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:42:23 +0000 (09:42 -0800)
97/c7b6bea030a87fa3626afd00958ee40c3f17ee [new file with mode: 0644]

diff --git a/97/c7b6bea030a87fa3626afd00958ee40c3f17ee b/97/c7b6bea030a87fa3626afd00958ee40c3f17ee
new file mode 100644 (file)
index 0000000..19cd51d
--- /dev/null
@@ -0,0 +1,144 @@
+Return-Path: <anarcat@anarcat.ath.cx>\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 ABC79429E35\r
+       for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 21:12:38 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.274\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.274 tagged_above=-999 required=5\r
+       tests=[RDNS_NONE=1.274] 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 URAsju-Nz5PV for <notmuch@notmuchmail.org>;\r
+       Mon, 16 Jan 2012 21:12:38 -0800 (PST)\r
+Received: from marcos.anarcat.ath.cx (unknown [72.0.72.144])\r
+       by olra.theworths.org (Postfix) with ESMTP id DC5B4429E2F\r
+       for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 21:12:37 -0800 (PST)\r
+Received: by marcos.anarcat.ath.cx (Postfix, from userid 1000)\r
+       id 621A0143139; Tue, 17 Jan 2012 00:12:37 -0500 (EST)\r
+From: Antoine =?utf-8?Q?Beaupr=C3=A9?= <anarcat@koumbit.org>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/2] lib: Add back the synchronization of 'T' flag with\r
+       deleted tag.\r
+In-Reply-To: <874nw88nl8.fsf@nikula.org>\r
+References: <1310874973-28437-1-git-send-email-anarcat@koumbit.org>\r
+       <874nw88nl8.fsf@nikula.org>\r
+User-Agent: Notmuch/0.10.2 (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Tue, 17 Jan 2012 00:12:36 -0500\r
+Message-ID: <87ehuykj3v.fsf@marcos.anarcat.ath.cx>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha256; protocol="application/pgp-signature"\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, 17 Jan 2012 05:12:38 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Sat, 07 Jan 2012 00:37:07 +0200, Jani Nikula <jani@nikula.org> wrote:\r
+> On Sat, 16 Jul 2011 23:56:12 -0400, Antoine Beaupr=C3=A9 <anarcat@koumbit=\r
+.org> wrote:\r
+> > +    // TODO: this should probably be moved up in the stack to avoid\r
+> > +    // opening the config file on every message (!)\r
+> > +    config =3D notmuch_config_open (ctx, NULL, NULL);\r
+>=20\r
+> The config file is for notmuch the command line tool, *not* for the\r
+> lib. You can't call the cli from from the lib. The config (or command\r
+> line argument) should be passed as argument, but that would require\r
+> changing the lib interface.\r
+\r
+I see. I wasn't aware of that.\r
+\r
+> > + *   'T' iff the message has the "trashed" tag and\r
+> > + *   state->reckless_trash is TRUE.\r
+>=20\r
+> "trashed" tag?\r
+\r
+That should probably be "deleted".\r
+\r
+> The comment (and the commit message) is incorrect. You only check for\r
+> reckless_trash in maildir_flags_to_tags, not tags_to_maildir_flags.\r
+> With this patch, one-way syncing from tags to flags would be done\r
+> unconditionally. And if I understand the problem correctly, you're\r
+> fixing the less critical one of the two!\r
+\r
+Indeed! What an oversight...\r
+\r
+> I am wondering (but I'm too tired to check) if the original problem\r
+> could be avoided by simply refusing to sync "deleted" tag to 'T' flag if\r
+> there are more than one file for that message.\r
+\r
+That would be a great idea.\r
+\r
+> This is a dangerous feature, which is why it was originally\r
+> disabled. Accidentally deleting mail is not something people take\r
+> lightly. They'll be amused by "reckless trash" - until it recklessly\r
+> deletes an important mail.\r
+\r
+Yes, I understand this.\r
+\r
+> However, something like this might be a useful feature to have for\r
+> people who want to delete mail. It would need good tests to accompany\r
+> it, though.\r
+\r
+And to be honest, that's where I got off the boat. :) It just got too\r
+hard, and anyways I use a custom script that deletes mails from notmuch\r
+search tag:deleted, so syncing that flag isn't so important for me.\r
+\r
+I guess this got everything covered for me. I would be ready to accept\r
+this patch being dropped from the queue, although I think it's a key\r
+step in having a more general tag to maildir flags synchronisation\r
+strategy that would allow to run notmuch from multiple clients, without\r
+having to sync databases around.\r
+\r
+Thanks for the review, this patch is indeed not ready, and I am not sure\r
+when I will have time to push it further.\r
+\r
+Cheers,\r
+\r
+A.\r
+\r
+=2D-=20\r
+Modern man has a kind of poverty of the spirit which stands\r
+in great contrast to his remarkable scientific and technological\r
+achievements. We've learned to walk in outer space and yet we\r
+haven't learned to walk to earth as brothers and sisters.\r
+                        - Dr. Martin Luther King, Jr.\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iQIcBAEBCAAGBQJPFQNEAAoJEHkhUlJ7dZIeSMgP/0sr+KJ+BPf7yU7i3H8rgVe/\r
+URVWT1Kt4vnVu0WHMyAxQJMghRgwHi3HHDDHP7CnN98r12Gu7qhtEGbLirv6Bgz5\r
+V0qW3NTpGsJxdkU00L9qNDWBi1zjuTDV+NnjgiwU+CphMwFYiowJzzi6hS2frWPl\r
+3A1hB+xg2p4Izvx6LdYXY/2hpXnY+zj9K8hzb/ui1/pX0bOxLfbtN6zd4cLfZ4NU\r
+WjKHQLb/1+sZjB6ZxL6pHWVv80b4EpdEHxaqxxpOw53zQSOZlXN31aUnCfpVmBsg\r
+gJwZV0MtHbT8+tq18c4C+dI7s4dJBJzOwbE4Wd5vLtMl/bAw88aBVzc3t/s2tQJw\r
+5/ODLnt5+7PDQZ73c0pjSNLOzCX+YCvtaWTOyTP1nHQJSNvP/n+sVDdfI/5l2T88\r
+61Q0doofSUgYl6NNLPpy/gYfgwQ2d7FzVb0lwd5Imq6H5OkVYPpincxNh+vV1TvA\r
+bvgHI8YLCwdkPqBrII1KA6ERmQhKbiJT7mdZocT7A92W4bdQzcfHPUmKqCQuWZm3\r
+BUGze8h9s/vT9sMHY3FhvRGWKf3mdseKYVITM6hrw29nFqcY2TWrmJoQah7ZkErK\r
+qhFR7Ox1P6MPa5K44gCrtVmOewMrOqeRt12rBUOj8SJnzyUuHxTvNc7vNq9XpoSC\r
+Rr+4wNmAq1dYoAzTesUu\r
+=pOm8\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r