Re: [PATCH] Fix typo in Message.maildir_flags_to_tags
[notmuch-archives.git] / 06 / d1c1a768fb089d8c3f5ae174d8c8067522a7fa
1 Return-Path: <Sebastian@SSpaeth.de>\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 982B540BFD3\r
6         for <notmuch@notmuchmail.org>; Tue, 21 Sep 2010 02:44:50 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.99\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.99 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
13         DKIM_VALID_AU=-0.1, T_MIME_NO_TEXT=0.01] 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 0pTtbC4E1vWf for <notmuch@notmuchmail.org>;\r
17         Tue, 21 Sep 2010 02:44:40 -0700 (PDT)\r
18 Received: from homiemail-a18.g.dreamhost.com (caiajhbdcbef.dreamhost.com\r
19         [208.97.132.145])\r
20         by olra.theworths.org (Postfix) with ESMTP id 12E1F40BD85\r
21         for <notmuch@notmuchmail.org>; Tue, 21 Sep 2010 02:44:40 -0700 (PDT)\r
22 Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1])\r
23         by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 21BBA25006B;\r
24         Tue, 21 Sep 2010 02:44:39 -0700 (PDT)\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=SSpaeth.de; h=from:to:cc:subject\r
26         :in-reply-to:references:date:message-id:mime-version:\r
27         content-type; q=dns; s=sspaeth.de; b=lw0Dfpzu4yrQBlHN2c2N2oRqBn1\r
28         Lhsb1DHfVaJHG2mONwLrWd0daCnnGpJmXvl6sFvMkk8Z3UxrfJRtScXppWCIJCYJ\r
29         r253dgeAwExmQEqFiKZa+XGCEIExO5uHr8r69o//+qYmgMaZ3eDjSESjK8Frwhc5\r
30         w1sHW/e2LyV81SuQ=\r
31 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=SSpaeth.de; h=from:to:cc\r
32         :subject:in-reply-to:references:date:message-id:mime-version:\r
33         content-type; s=sspaeth.de; bh=lAz3m5K9DnWrRSC2Gum0HHiQeJI=; b=A\r
34         adsJzq5QD7T6heYOhtzfS6GlfLsVy+B6TdgmmO+sJBsybKtuMBUhE8Q+EOyel1s3\r
35         GOwehWtd19acujpJ6jh78UqAOatwWQkxSjiD0ydpZ4pgccMjy6su1+cCr0N/EsUV\r
36         39YyNuh45dtatJ9mlEOBXSR/Wel7GEtQqd86MfsaF0=\r
37 Received: from spaetzbook.sspaeth.de (mtec-hg-docking-2-dhcp-016.ethz.ch\r
38         [82.130.121.16]) (Authenticated sender: fax@sspaeth.de)\r
39         by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPA id 8B2AC250069; \r
40         Tue, 21 Sep 2010 02:44:37 -0700 (PDT)\r
41 Received: by spaetzbook.sspaeth.de (sSMTP sendmail emulation);\r
42         Tue, 21 Sep 2010 11:44:35 +0200\r
43 From: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
44 To: Rob Browning <rlb@defaultvalue.org>\r
45 Subject: Re: notmuchsync: handling of the deleted tag\r
46 In-Reply-To: <87r5gnomt2.fsf@raven.defaultvalue.org>\r
47 References: <87bp7vewa5.fsf@raven.defaultvalue.org>\r
48  <87mxrcsb8a.fsf@SSpaeth.de>    <87r5gnomt2.fsf@raven.defaultvalue.org>\r
49 User-Agent: Notmuch/0.3.1-43-g5d515b7 (http://notmuchmail.org) Emacs/23.1.50.1\r
50         (x86_64-pc-linux-gnu)\r
51 Date: Tue, 21 Sep 2010 11:44:29 +0200\r
52 Message-ID: <87zkvb4eiq.fsf@SSpaeth.de>\r
53 MIME-Version: 1.0\r
54 Content-Type: multipart/signed; boundary="=-=-=";\r
55         micalg=pgp-sha1; protocol="application/pgp-signature"\r
56 Cc: Notmuch developer list <notmuch@notmuchmail.org>\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Tue, 21 Sep 2010 09:44:50 -0000\r
70 \r
71 --=-=-=\r
72 Content-Transfer-Encoding: quoted-printable\r
73 \r
74 On 2010-09-21, Rob Browning wrote:\r
75 > Conceptually what I'd like for it to do, is reference count -- only mark\r
76 > the message deleted if every occurrence (across all maildirs) is marked\r
77 > trashed (T).\r
78 \r
79 Right, but that is trickier than might appear at first sight.\r
80 \r
81 I parse those file names which notmuch is giving me (by default for\r
82 mails from the last 30 days, as reparsing ALL your mails every time\r
83 would be horribly expensive and often unneeded).=20\r
84 \r
85 notmuch is only able to give me one file name (+path) per mail id, so\r
86 that is what I examine. If that is the one copy that has the mail dir\r
87 flag "expired/trashed", I tag the message as "deleted".=20\r
88 \r
89 There is little else that notmuchsync can do here. I ask for new\r
90 messages and their file path and if they are expired mark it as such. I\r
91 have no way of finding out if there are other mails with the same mail\r
92 id from notmuch (unless I am very much mistaken).=20\r
93 \r
94 Doing reference counting would require me/notmuchsync to parse ALL your\r
95 mails by itself and finding out the often horribly mail id from the mail\r
96 headers myself... something that notmuchsync does not want to get into.\r
97 \r
98 See the problem? I could do reference counting if notmuch were able to\r
99 tell me how many file names/paths are associated with a mail id.\r
100 \r
101 \r
102 > Though even there I can imagine corner cases: imagine that notmuch\r
103 > doesn't initially see all your maildirs -- perhaps because you're using\r
104 > a folder filter in offlineimap, and so there are untrashed copies in the\r
105 > maildirs it hasn't seen yet.\r
106 \r
107 Right that would be a problem. But I cannot do reference counting unless\r
108 notmuch can give me the number of copies it knows about for a given mail\r
109 id (and internally it does know all associated file paths, so it would\r
110 be a simple API extension a la, "get_all_message_file_paths" or similar,\r
111 or a get_number_of_mail_files(mailid) to start with.\r
112 \r
113 > > And what should --revsync do when it finds a mail file that is marked\r
114 > > as expired.\r
115 \r
116 What should notmuch do BTW if there are 2 copies and 1 is expired and 1 not?\r
117 Mark as "deleted" or not?\r
118 \r
119 > Looks like you got cut off there.\r
120 \r
121 Right, it was 5pm and I left the computer :). I had intented to rant\r
122 about the deficiencies of the notmuch 1 document per mail id approach\r
123 here, but I don't see a better approach. All that would be useful from\r
124 the notmuch side is to get all associated filenames with a mail id.\r
125 \r
126 sebastian\r
127 \r
128 --=-=-=\r
129 Content-Type: application/pgp-signature\r
130 \r
131 -----BEGIN PGP SIGNATURE-----\r
132 Version: GnuPG v1.4.10 (GNU/Linux)\r
133 \r
134 iEYEARECAAYFAkyYfn0ACgkQVYX1jMgnoGLvfwCfT2/qB7F4+9rnD3Wa5D4TVVax\r
135 URwAnRpT9z47Jndv0anDB334SelhYiAq\r
136 =3Afd\r
137 -----END PGP SIGNATURE-----\r
138 --=-=-=--\r