Re: [PATCH 2/2] tags_to_maildir_flags: Don't rename if no flags change
authorAustin Clements <amdragon@MIT.EDU>
Tue, 12 Jul 2011 00:03:44 +0000 (20:03 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:05 +0000 (09:39 -0800)
55/e09de0678535a0ae545e605fdae264de798511 [new file with mode: 0644]

diff --git a/55/e09de0678535a0ae545e605fdae264de798511 b/55/e09de0678535a0ae545e605fdae264de798511
new file mode 100644 (file)
index 0000000..c324fce
--- /dev/null
@@ -0,0 +1,114 @@
+Return-Path: <amdragon@mit.edu>\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 5F17F429E25\r
+       for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 17:03:57 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 eMIZDMQ7Vub1 for <notmuch@notmuchmail.org>;\r
+       Mon, 11 Jul 2011 17:03:56 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+       [18.9.25.14])\r
+       by olra.theworths.org (Postfix) with ESMTP id D931F431FD0\r
+       for <notmuch@notmuchmail.org>; Mon, 11 Jul 2011 17:03:56 -0700 (PDT)\r
+X-AuditID: 1209190e-b7c39ae000000a8c-d7-4e1b8f3d36af\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 7E.6C.02700.D3F8B1E4; Mon, 11 Jul 2011 20:03:09 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id p6C03uDj022207; \r
+       Mon, 11 Jul 2011 20:03:56 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p6C03sno000197\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 11 Jul 2011 20:03:55 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.72)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1QgQS0-0003Iu-Fp; Mon, 11 Jul 2011 20:03:44 -0400\r
+Date: Mon, 11 Jul 2011 20:03:44 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Louis Rilling <l.rilling@av7.net>\r
+Subject: Re: [PATCH 2/2] tags_to_maildir_flags: Don't rename if no flags\r
+ change\r
+Message-ID: <20110712000344.GD25558@mit.edu>\r
+References: <87d3hzgemi.fsf@yoom.home.cworth.org>\r
+       <1310394978-11883-3-git-send-email-l.rilling@av7.net>\r
+       <20110711200712.GB25558@mit.edu>\r
+       <20110711223805.GC3583@localdomain>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <20110711223805.GC3583@localdomain>\r
+User-Agent: Mutt/1.5.20 (2009-06-14)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT17Xtl/YzePuA3+J8yysWi+s3ZzI7\r
+       MHncXbeO3ePZqlvMAUxRXDYpqTmZZalF+nYJXBnLlu1hKejhrph0fTNzA+MVji5GTg4JAROJ\r
+       z1PesULYYhIX7q1n62Lk4hAS2McocfXCVhYIZwOjxJ+fh9hAqoQETjJJTN9cCZFYwiix69Ny\r
+       ZpAEi4CqxPc/+xhBbDYBDYlt+5eD2SJA8Z3tR9lBbGYBaYlvv5uZQGxhgUCJQzN2gtm8AjoS\r
+       39t+MUIM3cQo8Wx5LyNEQlDi5MwnLBDNWhI3/r0EauAAG7T8HweIySlgILH2thtIhaiAisS1\r
+       /e1sExiFZiFpnoWkeRZC8wJG5lWMsim5Vbq5iZk5xanJusXJiXl5qUW6xnq5mSV6qSmlmxhB\r
+       Yc0pybeD8etBpUOMAhyMSjy8q6Sl/YRYE8uKK3MPMUpyMCmJ8v7qAgrxJeWnVGYkFmfEF5Xm\r
+       pBYfYpTgYFYS4Q2pBcrxpiRWVqUW5cOkpDlYlMR5o7z/+woJpCeWpGanphakFsFkZTg4lCR4\r
+       z/cBNQoWpaanVqRl5pQgpJk4OEGG8wANP98LMry4IDG3ODMdIn+KUVFKnDcSpFkAJJFRmgfX\r
+       C0s7rxjFgV4R5r0CUsUDTFlw3a+ABjMBDX4tLQkyuCQRISXVwFjzyDnT9OSFd/11h785X/tX\r
+       wLDpxq6XHV//ekyTm1OVpfNV6kalhOW83MCP3FY3ujQiNK8bZPQ9W555mrPd31I8WTHv0f51\r
+       j0SvHGA/2H3ddfpdl5cnNq/Zd36957ktU6uOhEZuafh7SSHgyRfuhEgTVUEFa+t9XgsX2lhy\r
+       9peffKYd5CN4QFaJpTgj0VCLuag4EQDHuCeZFgMAAA==\r
+Cc: notmuch@notmuchmail.org\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, 12 Jul 2011 00:03:57 -0000\r
+\r
+Quoth Louis Rilling on Jul 12 at 12:38 am:\r
+> On 11/07/11 16:07 -0400, Austin Clements wrote:\r
+> > I worry that this may compound the confusion caused by mutt's handling\r
+> > of the new flag, but I suppose people aren't likely to manipulate any\r
+> > of the other maildir-synchronized flags without also marking the\r
+> > message as seen.\r
+> \r
+> Even if they don't mark the message as seen, any flag changed would\r
+> move the message to cur/. The only buggy behavior would be from\r
+> mutt, with the bug you mentioned about mutt putting messages with\r
+> flags back to new/.\r
+\r
+Yes.  I was thinking of someone tagging a message as, say, flagged,\r
+while it's still tagged unread.  Then it would change from new to old\r
+in mutt.  OTOH, adding some other non-synchronized tag wouldn't change\r
+it from new to old.  I don't think there is a "correct" solution; your\r
+approach is probably the best compromise.\r
+\r
+> > The convention in notmuch is to use notmuch_bool_t, TRUE, and FALSE\r
+> > (though, admittedly, I don't know why; avoiding C99-isms?)\r
+> \r
+> And bool is already used at another place in message.cc:\r
+> \r
+>      struct maildir_flag_tag {\r
+>          char flag;\r
+>          const char *tag;\r
+>          bool inverse;\r
+>      };\r
+> \r
+> IIUC it should be changed to notmuch_bool_t too.\r
+\r
+Yes, I suppose it should (something slipped by cworth's eagle-eyed\r
+reviews!).  Though that appears to be the sole use of bool in all of\r
+libnotmuch.\r