Re: Hi all
[notmuch-archives.git] / a5 / 48ad3f1c62ddb4f89012992ea88bac46c193ee
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 BD9BF40DBDC\r
6         for <notmuch@notmuchmail.org>; Tue,  9 Nov 2010 16:57:27 -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: -2.89\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.89 tagged_above=-999 required=5\r
12         tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_MIME_NO_TEXT=0.01]\r
13         autolearn=ham\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id Fp9dodJ3xgtl; Tue,  9 Nov 2010 16:57:15 -0800 (PST)\r
17 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
18         by olra.theworths.org (Postfix) with ESMTP id F1D0840DBD8;\r
19         Tue,  9 Nov 2010 16:57:14 -0800 (PST)\r
20 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
21         id 983C925412B; Tue,  9 Nov 2010 16:57:14 -0800 (PST)\r
22 From: Carl Worth <cworth@cworth.org>\r
23 To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org\r
24 Subject: Re: [PATCH v4 0/4] Maildir synchronization\r
25 In-Reply-To: <877hgm2hjg.fsf@steelpick.2x.cz>\r
26 References: <87tyk3vpxd.fsf@wsheee.2x.cz>\r
27         <1288560558-18915-1-git-send-email-sojkam1@fel.cvut.cz>\r
28         <877hgsrjau.fsf@yoom.home.cworth.org> <87d3qhq527.fsf@resox.2x.cz>\r
29         <874obrmww9.fsf@yoom.home.cworth.org>\r
30         <87iq066cbd.fsf@steelpick.2x.cz>\r
31         <87oc9ykzae.fsf@yoom.home.cworth.org>\r
32         <877hgm2hjg.fsf@steelpick.2x.cz>\r
33 User-Agent: Notmuch/0.4 (http://notmuchmail.org) Emacs/23.2.1\r
34         (i486-pc-linux-gnu)\r
35 Date: Tue, 09 Nov 2010 16:57:14 -0800\r
36 Message-ID: <87lj52knbp.fsf@yoom.home.cworth.org>\r
37 MIME-Version: 1.0\r
38 Content-Type: multipart/signed; boundary="=-=-=";\r
39         micalg=pgp-sha1; protocol="application/pgp-signature"\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Wed, 10 Nov 2010 00:57:28 -0000\r
53 \r
54 --=-=-=\r
55 Content-Transfer-Encoding: quoted-printable\r
56 \r
57 On Wed, 10 Nov 2010 00:39:31 +0100, Michal Sojka <sojkam1@fel.cvut.cz> wrot=\r
58 e:\r
59 > Did you try ./maildyr-sync -v?\r
60 \r
61 Ah, no. That's always seemed really noisy. What I want is simply to see\r
62 the information related to a failure *when a failure occurs*, and not a\r
63 lot of noise, (nor having to re-run with extra options to see the output\r
64 I want).\r
65 \r
66 > test_expect_success is not ideal though. Without -v, it should\r
67 > automatically show stdout when a test fails. I'll send patch for this in\r
68 > another mail.\r
69 \r
70 Cool. I'll look for that.\r
71 \r
72 > This only fails if the message is in */new and there is no */cur.\r
73 \r
74 Right. I think that's a little too severe.\r
75 \r
76 > I do not know if MH format has something special or it is just plain\r
77 > files in plain directories. If the latter, the synchronzation should\r
78 > work unless one of the directories is named 'new'.\r
79 \r
80 The MH format is plain files in plain directories.\r
81 \r
82 But in this case, I would contend that we don't _want_ the\r
83 synchronization to work. The files shouldn't be getting renamed at all\r
84 unless we are dealing with maildir.\r
85 \r
86 Neither maildir nor mh give us anything extremely reliable that we can\r
87 use to unambiguously distinguish between them. But I think a heuristic\r
88 of:\r
89 \r
90         if "cur" and "new" sub-directories exist:\r
91                 then this directory is maildir;\r
92 \r
93 And only when this heuristic passes should we be fiddling with filenames\r
94 in maildir-specified ways.\r
95 \r
96 > If you think that what we have now is not sufficient, I'd need some help\r
97 > with this.\r
98 \r
99 I'll look.\r
100 \r
101 > P.S. Because of my work on test suite, I didn't do any additional tests\r
102 > for maildir synchronization, so maybe tomorrow :-(\r
103 \r
104 No problem. I appreciate your help improving the test-suite\r
105 infrastructure!\r
106 \r
107 Meanwhile, I ran into one problem with my proposal. We can't use\r
108 notmuch_message_sync_with_maildir_flags since notmuch_message_sync is an\r
109 internal interface. The corresponding public interface actually consists\r
110 of three or four different functions (notmuch_message_add_tag,\r
111 notmuch_message_remove_tag, and notmuch_message_freeze/thaw). I think it\r
112 would be quite crazy to add _with_maildir_flags variants of all of\r
113 those.\r
114 \r
115 So maybe we will need a new function for the purpose of synchronizing\r
116 the current tags of a message to a maildir filename. So that would be,\r
117 perhaps, notmuch_message_tags_to_maildir_flags or so?\r
118 \r
119 Finally, I'm also a bit unsettled about the handling of the "S"\r
120 flag. For all the other flags it is easy to document that\r
121 notmuch_database_add_message_with_maildir_flags simply adds the\r
122 corresponding tag to the message. But we can't say that the presence of\r
123 the "S" tag prevents this function from adding the "unread" tag, since\r
124 this function never does add an "unread" tag.\r
125 \r
126 Instead, the setting of "unread" is taking place at a higher-level,\r
127 (inside "notmuch new"). So perhaps the right answer is for the library\r
128 function to add a "seen" tag, (making the handling of 'T' consistent\r
129 with all other tags and dropping the "inverse" field from the\r
130 table). Then, the "notmuch new" program can query the "seen" tag to\r
131 decide whether it should add its configured new_tags, ("inbox" and\r
132 "unread" by default).\r
133 \r
134 I do want something like that anyway, because I want to make it so that\r
135 someone that first starts with notmuch and a large collection of maildir\r
136 messages doesn't end up with every message tagged as "inbox" after their\r
137 first run of "notmuch new".\r
138 \r
139 So anyway, I'm currently working on implementing what I described\r
140 above. And I may change my mind slightly as I work through things.\r
141 \r
142 I'll let you know,\r
143 \r
144 =2DCarl\r
145 \r
146 =2D-=20\r
147 carl.d.worth@intel.com\r
148 \r
149 --=-=-=\r
150 Content-Type: application/pgp-signature\r
151 \r
152 -----BEGIN PGP SIGNATURE-----\r
153 Version: GnuPG v1.4.10 (GNU/Linux)\r
154 \r
155 iD8DBQFM2e3q6JDdNq8qSWgRAnCnAKCWB9eCnZS1V2zqYM5zovzaj9XLoQCeJLPe\r
156 YEqRTg5iC/+SKpwbRuvPPww=\r
157 =mknV\r
158 -----END PGP SIGNATURE-----\r
159 --=-=-=--\r