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