Re: [notmuch] inbox/unread tags for new messages [was: Re: Thoughts on notmuch and...
[notmuch-archives.git] / 3a / bf93a3eb8cec506d6e7a830a76f1a9826a8db3
1 Return-Path: <jrollins@finestructure.net>\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 D8C9D431FBC\r
6         for <notmuch@notmuchmail.org>; Sat, 16 Jan 2010 15:38:52 -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.59\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.59 tagged_above=-999 required=5 tests=[AWL=0.009, \r
12         BAYES_00=-2.599] autolearn=unavailable\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 gPuHRt+jp+k4 for <notmuch@notmuchmail.org>;\r
16         Sat, 16 Jan 2010 15:38:52 -0800 (PST)\r
17 Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7])\r
18         by olra.theworths.org (Postfix) with ESMTP id A4A92431FAE\r
19         for <notmuch@notmuchmail.org>; Sat, 16 Jan 2010 15:38:52 -0800 (PST)\r
20 Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com\r
21         [72.227.128.66])\r
22         (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0)\r
23         by tarap.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id o0GNcfLc014173\r
24         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
25         Sat, 16 Jan 2010 18:38:42 -0500 (EST)\r
26 Received: from jrollins by servo.finestructure.net with local (Exim 4.71)\r
27         (envelope-from <jrollins@finestructure.net>)\r
28         id 1NWIE4-0003oZ-PT; Sat, 16 Jan 2010 18:38:40 -0500\r
29 Date: Sat, 16 Jan 2010 18:38:40 -0500\r
30 From: Jameson Rollins <jrollins@finestructure.net>\r
31 To: Carl Worth <cworth@cworth.org>\r
32 Message-ID: <20100116233840.GA31869@finestructure.net>\r
33 References: <20100114084713.GA22273@harikalardiyari>\r
34         <87eilse1hg.fsf@yoom.home.cworth.org>\r
35         <20100115001600.GD25209@lapse.rw.madduck.net>\r
36         <87vdf3cd1y.fsf@yoom.home.cworth.org>\r
37         <20100115210934.GA12515@harikalardiyari>\r
38         <87r5prc64e.fsf@yoom.home.cworth.org>\r
39         <20100116201803.GA19570@finestructure.net>\r
40         <87bpgtd71q.fsf@yoom.home.cworth.org>\r
41 MIME-Version: 1.0\r
42 Content-Type: multipart/signed; micalg=pgp-sha256;\r
43         protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S"\r
44 Content-Disposition: inline\r
45 In-Reply-To: <87bpgtd71q.fsf@yoom.home.cworth.org>\r
46 User-Agent: Mutt/1.5.20 (2009-06-14)\r
47 X-No-Spam-Score: Local\r
48 X-Scanned-By: MIMEDefang 2.68 on 128.59.29.7\r
49 Cc: martin f krafft <madduck@madduck.net>, notmuch@notmuchmail.org\r
50 Subject: Re: [notmuch] inbox/unread tags for new messages [was: Re: Thoughts\r
51  on notmuch and Lua]\r
52 X-BeenThere: notmuch@notmuchmail.org\r
53 X-Mailman-Version: 2.1.13\r
54 Precedence: list\r
55 List-Id: "Use and development of the notmuch mail system."\r
56         <notmuch.notmuchmail.org>\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
60 List-Post: <mailto:notmuch@notmuchmail.org>\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
64 X-List-Received-Date: Sat, 16 Jan 2010 23:38:53 -0000\r
65 \r
66 \r
67 --AhhlLboLdkugWU4S\r
68 Content-Type: text/plain; charset=us-ascii\r
69 Content-Disposition: inline\r
70 Content-Transfer-Encoding: quoted-printable\r
71 \r
72 On Sat, Jan 16, 2010 at 02:22:09PM -0800, Carl Worth wrote:\r
73 > So the idea with "new" is really to just make the lower-level pieces of\r
74 > notmuch, (the command-line interface and the library), to steal less of\r
75 > the tag namespace. Specifically, the proposal is to reserve a single tag\r
76 > ("new") rather than two tags ("inbox" and "unread"). Then, it's a matter\r
77 > of some higher-level layers (such as the emacs interface) to apply\r
78 > special meaning to things like "inbox" and "unread".\r
79 \r
80 I personally don't really think that this is a good idea.  If this is\r
81 all left up to mail reader, and the mail readers all do something\r
82 different, then it would be very difficult to switch readers, or to\r
83 use different readers for different circumstances.  I really think\r
84 that all of this stuff should be handled uniformly by the notmuch CLI\r
85 in a very structured way.  If we make sane decisions at that level,\r
86 then things are nicely consistent.\r
87 \r
88 What I would instead suggest is that there is a notmuch new hook,\r
89 handled at the notmuch program level, that would allow users to define\r
90 scripts or functions that would be applied to all new messages.  Then\r
91 users could do whatever they want to new messages.  As long as it's\r
92 done at the notmuch CLI level, instead of at the reader level, things\r
93 won't get fractured by divergent reader implementations.  This ideal\r
94 is also in line with the proposal I put forth in\r
95 id:20100116204955.GA858@finestructure.net.\r
96 \r
97 > On Sat, 16 Jan 2010 15:18:03 -0500, Jameson Rollins <jrollins@finestructu=\r
98 re.net> wrote:=20\r
99 > > I think that the 'unread' tag should be tightly synced to the maildir\r
100 > > 'S' flags, which indicate the read status on the maildir message files\r
101 > > themselves.  This is useful for compatibility with other MUAs, and is\r
102 > > one of the few generally useful tags that can be synced through IMAP.\r
103 >=20\r
104 > The tight synchronization of this tag does seem useful. But I'm still\r
105 > not sure what the precise plan here should be. We could change from having\r
106 > the tag in the database be authoritative to instead have the character\r
107 > in the filename be authoritative, but we would need answers for the\r
108 > following questions:\r
109 >=20\r
110 >   1. How do we deal with files that don't match maildir conventions?\r
111 >      (Either not in a /cur or /new directory or not matching the\r
112 >      filename convention.)\r
113 \r
114 I'm not sure this is the right question.  It seems to me that if\r
115 notmuch is going to be using maildir, then notmuch itself should do\r
116 everything to conform to the maildir convention, as well as assume\r
117 that anything else touching the same maildirs is doing so as well.\r
118 Notmuch should be moving files from new to cur as it processes them,\r
119 and it should be adding the S flag if a message has been seen/read.\r
120 \r
121 If there are files in the maildir that don't conform, then they should\r
122 either be ignored with some sort of warning, or they should just be\r
123 added to the database with no special care at all (maybe with a\r
124 warning).\r
125 \r
126 >   2. How do we actually make the transition from the old scheme to the\r
127 >      new? (Perhaps we do this with an increment in the database version\r
128 >      number and transfer the data from the database to the filenames for\r
129 >      all known files at the time of the upgrade?)\r
130 \r
131 Is it really a scheme change that would require delicate handling?  I\r
132 would think that the change would be fairly straightforward:\r
133 \r
134 - if notmuch sees that a message in the maildir has moved from new to\r
135   cur and/or the S flag has been added then any 'unread' flags should\r
136   be removed from the message.\r
137 \r
138 - if a 'unread' tag is removed from a message, then the message S flag\r
139   should be added.\r
140 \r
141 It doesn't seem that any database changes need to be made.\r
142 \r
143 > > The 'unread' tag should also not be something that the user ever\r
144 > > consciously has to get rid of.  Notmuch MUAs should just get rid of it\r
145 > > automatically when the user actually views the message.  The notmuch\r
146 > > emacs UI is currently not handling this very well, but I think we can\r
147 > > tweak that fairly easily.\r
148 >=20\r
149 > I agree on all points. I've been sitting on an unfinished patch series\r
150 > to implement some ideas I proposed here:\r
151 >=20\r
152 >       id:877ht3hfh0.fsf@yoom.home.cworth.org\r
153 >=20\r
154 > I plan to get back to finishing that soon. (I set all emacs interface\r
155 > work aside for a while to do the rename support.) Some of the ideas I\r
156 > outline there will make the handling of unread more sane I think. I'd be\r
157 > glad to hear any further ideas.\r
158 \r
159 I really think this should just be done in the most stupid simple way\r
160 imaginable: if you view/open a message buffer, the 'unread' tag goes\r
161 away.  That simple.  I really don't think it's worth spending any time\r
162 trying to make it more nuanced or sophisticated than that.  Users\r
163 should not ever have to think about changing this tag, and if they\r
164 really want to, they can just use the tag function.\r
165 \r
166 > I totally agree. One of the most-important reasons I had in mind when\r
167 > starting notmuch was the desired to get to a point where I could\r
168 > actually reason about, and explore more-improved mail flow. Everything\r
169 > so far has been about getting some low-level plumbing working. I've got\r
170 > a bunch of ideas for novel mail-handling techniques that will be enabled\r
171 > by notmuch, and we definitely haven't scratched the surface yet. I'm\r
172 > sure many readers of this list have similar (and different!) ideas and\r
173 > I'm looking forward to seeing what we can come up with together.\r
174 \r
175 Yeah, I am totally on board with your vision for notmuch, Carl.  It's\r
176 a incredibly nice new way to handle mail.  You've done a great job\r
177 keeping things simple yet flexible.  I really hope we can continue in\r
178 that same vein.  I think that the proposal I put forward in my other\r
179 message will help further that goal (keep things simple and well\r
180 structured, but allow flexibility).\r
181 \r
182 I have no doubt that there will be lots of very novel uses for notmuch\r
183 in the future.  I was already talking to a friend about how notmuch\r
184 should absolutely be used by mailing list handlers.  How sweet would\r
185 it be to have web interfaces to notmuch mail list archives.\r
186 \r
187 jamie.\r
188 \r
189 --AhhlLboLdkugWU4S\r
190 Content-Type: application/pgp-signature; name="signature.asc"\r
191 Content-Description: Digital signature\r
192 Content-Disposition: attachment\r
193 \r
194 -----BEGIN PGP SIGNATURE-----\r
195 Version: GnuPG v1.4.10 (GNU/Linux)\r
196 \r
197 iQIcBAEBCAAGBQJLUk35AAoJEO00zqvie6q8YzEQAJR9CAGUk8zClqNcFyqlDbRS\r
198 6ln5lcV2GniB/twbUYZL2E1mFyv+YHe3k44XmuWKne0Dh4Q1mwri5HJyk8/m8fYr\r
199 EHGYgf1CmZgb1bbqP2X0gxBbpnJIU9MJOnGnOx+easipkKnDRBJyBSNuuSxcbJ08\r
200 ISB4IBy5XzMwa0G+Rxt2bTDixY20XsLeIKQcR9ueD3yQSJ5m7LFTjO0CbIf6BGwA\r
201 AonLwwEPcxHqyQeGnoTLMU8bK6A+0pf92ALaHJzG7QkXNYtmYChOkFo3KllEEIRb\r
202 w+LjxsPNrhql+Yx8ZrqdwQ24Bc2f5myjQ7Ms+IP2TYa6Rq0ARJ2oexe2UfMlWlYX\r
203 wVPnsmml2nKWRUP55XiAETFo5eHP57vmIEWt0f5da0wdxkCCbEc5SqsSrPg8YNyJ\r
204 E71FAcQtTbbd8NLijfD2i/sBqNQOR9z6A4Ek+WTLSlqgfsTOHUd+p5ArTrN2jQgd\r
205 bOG7WuhrOf/8gxQgZTIgGMyO5hqPrCVuGIfNr06sqV6djJ8dmE+MXOxcgb7RwYVb\r
206 Uwmgcx/AltsAI85qZ6OhhdwXyv7aHMW8FPtYvh/6GZZRn9MJQ3JLlXDk5iJrs47m\r
207 nF61QjQ/YF0UBodX0QWPlGk0B7iJacSvajU67o7yofwhTBNdn6REd3aAVqAnw43v\r
208 ABHPPtmGUM+sCZApIi4K\r
209 =K8aT\r
210 -----END PGP SIGNATURE-----\r
211 \r
212 --AhhlLboLdkugWU4S--\r