Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / d9 / 18ceac74f3f824b3de7af7de119c402a455604
1 Return-Path: <cworth@cworth.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 8DEDF431FD0\r
6         for <notmuch@notmuchmail.org>; Wed, 26 Jan 2011 01:15:23 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.99\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.99 tagged_above=-999 required=5\r
12         tests=[ALL_TRUSTED=-1, T_MIME_NO_TEXT=0.01] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id MfRH1clNTlEl; Wed, 26 Jan 2011 01:15:22 -0800 (PST)\r
16 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
17         by olra.theworths.org (Postfix) with ESMTP id F0502431FB5;\r
18         Wed, 26 Jan 2011 01:15:21 -0800 (PST)\r
19 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
20         id 349372540E0; Wed, 26 Jan 2011 19:15:21 +1000 (EST)\r
21 From: Carl Worth <cworth@cworth.org>\r
22 To: Austin Clements <amdragon@mit.edu>, Michal Sojka <sojkam1@fel.cvut.cz>\r
23 Subject: Re: [PATCH 1/3] new: Do not defer maildir flag synchronization during\r
24         the first run\r
25 In-Reply-To: <AANLkTinsC+89yx7jGUaB8PLiftLjyTr7gosUDgAC_g0S@mail.gmail.com>\r
26 References: <1295603977-14326-1-git-send-email-sojkam1@fel.cvut.cz>\r
27         <1295603977-14326-3-git-send-email-sojkam1@fel.cvut.cz>\r
28         <AANLkTinsC+89yx7jGUaB8PLiftLjyTr7gosUDgAC_g0S@mail.gmail.com>\r
29 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.2.1\r
30         (i486-pc-linux-gnu)\r
31 Date: Wed, 26 Jan 2011 19:15:21 +1000\r
32 Message-ID: <87pqrk10wm.fsf@yoom.home.cworth.org>\r
33 MIME-Version: 1.0\r
34 Content-Type: multipart/signed; boundary="=-=-=";\r
35         micalg=pgp-sha1; protocol="application/pgp-signature"\r
36 Cc: notmuch@notmuchmail.org\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Wed, 26 Jan 2011 09:15:23 -0000\r
50 \r
51 --=-=-=\r
52 \r
53 On Tue, 25 Jan 2011 17:42:30 -0500, Austin Clements <amdragon@mit.edu> wrote:\r
54 > Wouldn't this be simpler and more general?\r
55 ...\r
56 >         case NOTMUCH_STATUS_SUCCESS:\r
57 ..\r
58 >             if (state->synchronize_flags == TRUE)\r
59 > -               _filename_list_add (state->message_ids_to_sync,\r
60 > -                                   notmuch_message_get_message_id (message));\r
61 > +               notmuch_message_maildir_flags_to_tags (message);\r
62 \r
63 Yes, that is much simpler and should work equally well as the original\r
64 patch.\r
65 \r
66 But there's perhaps a problem with both of these patches. Besides\r
67 rename, (which obviously can't happen with a new message), we also need\r
68 to take care when a message is added with multiple filenames (and with\r
69 different flags on the files).\r
70 \r
71 We've got a plan for adding flags-to-tags mappings which only apply if\r
72 every file for the message has the corresponding flag. For example, this\r
73 is the semantic we want for the 'D' flag mapping to the "deleted" tag.\r
74 \r
75 So we'll want to make sure these cases do the right thing. Consider two\r
76 new files with the same Message-Id both appearing in a run of "notmuch\r
77 new", one with the D flag and one without.\r
78 \r
79 If the file with the D flag is seen first, and the maildir_flags_to_tags\r
80 processing happens without being deferred, then the "deleted" tag will\r
81 be applied to the message. This is different than would happen if both\r
82 messages were seen, but I think it's just fine. It's still in a state\r
83 that's consistent, nothing bad would happen if you interrupted this and\r
84 then acted on the "deleted" tag, and if you restarted "notmuch new" and\r
85 the second message were seen, then the tag would be correctly removed.\r
86 \r
87 So, I think I've convinced myself that the change is actually OK. But\r
88 then I'm also wondering if perhaps we could do the processing undeferred\r
89 in all cases?\r
90 \r
91 I haven't thought that through, but I'd be glad to hear your ideas.\r
92 \r
93 -Carl\r
94 \r
95 --=-=-=\r
96 Content-Type: application/pgp-signature\r
97 \r
98 -----BEGIN PGP SIGNATURE-----\r
99 Version: GnuPG v1.4.10 (GNU/Linux)\r
100 \r
101 iD8DBQFNP+Yp6JDdNq8qSWgRAub7AJ9hO3Yi5LZdB+M6YVIG/FnUF0Vt/QCeLMar\r
102 qknMTSgX/oBrZWRT2lXgZP8=\r
103 =Yxg1\r
104 -----END PGP SIGNATURE-----\r
105 --=-=-=--\r