Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 39 / 59943ca821b1228e6ffdae631410ce9a877401
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 62EE740DAF4\r
6         for <notmuch@notmuchmail.org>; Mon,  8 Nov 2010 14:03:34 -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 5KqKjTiaMAT3; Mon,  8 Nov 2010 14:03:22 -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 F33D140DACC;\r
19         Mon,  8 Nov 2010 14:03:21 -0800 (PST)\r
20 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
21         id A347225412C; Mon,  8 Nov 2010 11:35:18 -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: <87d3qhq527.fsf@resox.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 User-Agent: Notmuch/0.4 (http://notmuchmail.org) Emacs/23.2.1\r
30         (i486-pc-linux-gnu)\r
31 Date: Mon, 08 Nov 2010 11:35:18 -0800\r
32 Message-ID: <874obrmww9.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 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Mon, 08 Nov 2010 22:03:34 -0000\r
49 \r
50 --=-=-=\r
51 Content-Transfer-Encoding: quoted-printable\r
52 \r
53 On Sun, 07 Nov 2010 02:46:08 +0100, Michal Sojka <sojkam1@fel.cvut.cz> wrot=\r
54 e:\r
55 > On Thu, 04 Nov 2010, Carl Worth wrote:\r
56 > > I'm not entirely sure I like a big, global state-changing function like\r
57 > > that in the library. But if we do want to have that, we need to fix the\r
58 > > documentation of all functions that are affected by it to correctly\r
59 > > document their current behavior.\r
60 >=20\r
61 > I can imagine two other solutions. One would be to add a parameter\r
62 > (probably called flags) to the following functions:\r
63 >=20\r
64 >     notmuch_message_add_tag()\r
65 >     notmuch_message_remove_tag()\r
66 >     notmuch_message_thaw()\r
67 ...\r
68 > The other option would be to put a flag into notmuch_message_t but this\r
69 > is probably not very different from having it in notmuch_database_t.\r
70 \r
71 Here's yet another approach that I have in mind.\r
72 \r
73 We can implement all of the support by adding two new library functions:\r
74 \r
75         notmuch_database_add_message_with_maildir_flags\r
76         notmuch_message_sync_with_maildir_flags\r
77 \r
78 These functions would work like the existing\r
79 notmuch_database_add_message and notmuch_message_sync except they would\r
80 do the maildir-flag synchronization.\r
81 \r
82 This allows a user of the library to do whatever it wants, (no\r
83 synchronization, one-way synchronization in either direction, or two-way\r
84 synchronization), without having any sort of "configuration" API calls\r
85 in the library.\r
86 \r
87 > I think I could make notmuch_message_maildir_to_flags() private and call\r
88 > it from notmuch_database_add_message() so that both directions will be\r
89 > implemented in the library.\r
90 \r
91 Yes. That's in line with what I propose above.\r
92 \r
93 > The current implementation renames only the file whose name is stored\r
94 > first in the database. I have a TODO comment there to add a loop through\r
95 > all file names, but I have never realized that deleted flag could be so\r
96 > dangerous.\r
97 \r
98 I think what I'd like to do for now is to simply remove "deleted" from\r
99 the set of tags being manipulated by this support. This is the similar\r
100 to what Sebastian decided to do with notmuchsync when he described in\r
101 detail the same scenario I was concerned with:\r
102 \r
103         id:87eickhor1.fsf@SSpaeth.de\r
104 \r
105 Sebastian's solution was slightly different, ("deleted" was not\r
106 synchronized by default but could be explicitly requested). I propose\r
107 simply not synchronizing "deleted" until it can be made safe.\r
108 \r
109 > It will take me probably a few days until I find time to work on this.\r
110 > So let me now in that time whether you have some preferences in the\r
111 > above.\r
112 \r
113 I'd like to get things merged today, so I plan to take your patches and\r
114 then add new commits on top to implement the functions I described\r
115 above.\r
116 \r
117 I'll be interested in any feedback.\r
118 \r
119 Thanks again,\r
120 \r
121 =2DCarl\r
122 \r
123 =2D-=20\r
124 carl.d.worth@intel.com\r
125 \r
126 --=-=-=\r
127 Content-Type: application/pgp-signature\r
128 \r
129 -----BEGIN PGP SIGNATURE-----\r
130 Version: GnuPG v1.4.10 (GNU/Linux)\r
131 \r
132 iD8DBQFM2FD26JDdNq8qSWgRAqFpAJ9yhb5LuyC/LX+FCrb4dcY4bxOvxgCfRVzk\r
133 gmDXmtJz30XWY2aHp/WkOhs=\r
134 =f45/\r
135 -----END PGP SIGNATURE-----\r
136 --=-=-=--\r