Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / ff / 2dfa9e22d08662dd2c9f23c4a72a5a086f99e0
1 Return-Path: <alex.boterolowry@gmail.com>\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 C9CE9429E25\r
6         for <notmuch@notmuchmail.org>; Wed, 17 Aug 2011 19:31:40 -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: -0.798\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.798 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id z2bwfvW4lLIK for <notmuch@notmuchmail.org>;\r
18         Wed, 17 Aug 2011 19:31:39 -0700 (PDT)\r
19 Received: from mail-vx0-f181.google.com (mail-vx0-f181.google.com\r
20         [209.85.220.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id AC3E9431FD0\r
23         for <notmuch@notmuchmail.org>; Wed, 17 Aug 2011 19:31:39 -0700 (PDT)\r
24 Received: by vxi39 with SMTP id 39so1632046vxi.26\r
25         for <notmuch@notmuchmail.org>; Wed, 17 Aug 2011 19:31:36 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
27         h=mime-version:date:message-id:subject:from:to:content-type;\r
28         bh=KBGtQDXIUEK/AM6d7uD2ppyh0hIm6o+r38rtTWRu9v8=;\r
29         b=ORhfECtkQdifPEuqh/rAAKvUrjanUbteKJnEDXvLBEiBkuVvhVXmHlGnG2Oj0OOtcn\r
30         rKscX4dEkcK9Bd8LvVTH1uwXQ1kR+OqNB1xAYGJ++qhD6UJEUuPmjEZdhmQBW7CW3NNa\r
31         +R/lyh3b89GgEt94GJPIM+wZRTyZmPpYiDRM4=\r
32 MIME-Version: 1.0\r
33 Received: by 10.52.22.237 with SMTP id h13mr175282vdf.228.1313634696303; Wed,\r
34         17 Aug 2011 19:31:36 -0700 (PDT)\r
35 Received: by 10.52.188.4 with HTTP; Wed, 17 Aug 2011 19:31:36 -0700 (PDT)\r
36 Date: Wed, 17 Aug 2011 19:31:36 -0700\r
37 Message-ID:\r
38  <CANVhOgEgC+Yi7VRym9ez4tX23MZBB+OXhpoEwa0fxZ4pBL-1Ww@mail.gmail.com>\r
39 Subject: gmail syncing sort of working\r
40 From: Alex Botero-Lowry <alex.boterolowry@gmail.com>\r
41 To: notmuch@notmuchmail.org\r
42 Content-Type: multipart/alternative; boundary=20cf3079b6ee70134e04aabe6909\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Thu, 18 Aug 2011 02:31:41 -0000\r
56 \r
57 --20cf3079b6ee70134e04aabe6909\r
58 Content-Type: text/plain; charset=ISO-8859-1\r
59 \r
60 I finally got around to working on it and over the last two days have gotten\r
61 two-way gmail syncing with labels working.\r
62 \r
63 The list of caveats is much longer than the list of details:\r
64 \r
65 1) only tested with 100 messages, which is hard coded\r
66 2) doesn't update UIDs of messages on disk, though it mostly avoids\r
67 situations where that would be an issue\r
68 3) Can only do a full, scan every file sync, but it assumes that message\r
69 content is immutable so only adds new messages\r
70 4) Doesn't support syncing new/deleted messages from notmuch -> gmail (not\r
71 sure this is worth the trouble)\r
72 5) Quoting issues, i'm sure.\r
73 \r
74 \r
75 The basic approach is to get the difference between a the last sync and the\r
76 current notmuch state, sync the diff of labels to gmail, than we request\r
77 UID, X-GM-MSGID, Message-ID, and X-GM-LABELS from gmail for every message,\r
78 if it lacks a message-id we build a notmuch-sha1- one, hopefully that\r
79 approach won't change, we then write new messages to disk by using the\r
80 filename GMID=...,UID=.... to store that information, and then sync the\r
81 labels (with a mapping for special labels like sent, etc), then we look for\r
82 messages that have changed in gmail but not changed locally, and sync their\r
83 labels.\r
84 \r
85 I'm sure it won't work for you, but you might try it. :)\r
86 \r
87 source is at http://alexbl.net/~alexbl/imapsync.py\r
88 \r
89 p.s. I also ran into an issue with the notmuch python bindings where I had\r
90 to wrap every c_void_p in POINTER() or it would segfault for any method that\r
91 tried to use a pointer. Also the sed command that tries to build notmuch.sym\r
92 doesn't work on freebsd, i changed it to work, but i'm pretty sure it won't\r
93 work on linux anymore. :) I wonder if using ctags might actually work for\r
94 that.\r
95 \r
96 alex\r
97 \r
98 --20cf3079b6ee70134e04aabe6909\r
99 Content-Type: text/html; charset=ISO-8859-1\r
100 Content-Transfer-Encoding: quoted-printable\r
101 \r
102 I finally got around to working on it and over the last two days have gotte=\r
103 n two-way gmail syncing with labels working.<div><br></div><div>The list of=\r
104  caveats is much longer than the list of details:</div><div><br></div><div>\r
105 1) only tested with 100 messages, which is hard coded</div><div>2) doesn&#3=\r
106 9;t update UIDs of messages on disk, though it mostly avoids situations whe=\r
107 re that would be an issue</div><div>3) Can only do a full, scan every file =\r
108 sync, but it assumes that message content is immutable so only adds new mes=\r
109 sages</div>\r
110 <div>4) Doesn&#39;t support syncing new/deleted messages from notmuch -&gt;=\r
111  gmail (not sure this is worth the trouble)</div><div>5) Quoting issues, i&=\r
112 #39;m sure.</div><div><br></div><div><br></div><div>The basic approach is t=\r
113 o get the difference between a the last sync and the current notmuch state,=\r
114  sync the diff of labels to gmail, than we request UID, X-GM-MSGID, Message=\r
115 -ID, and X-GM-LABELS from gmail for every message, if it lacks a message-id=\r
116  we build a notmuch-sha1- one, hopefully that approach won&#39;t change, we=\r
117  then write new messages to disk by using the filename GMID=3D...,UID=3D...=\r
118 . to store that information, and then sync the labels (with a mapping for s=\r
119 pecial labels like sent, etc), then we look for messages that have changed =\r
120 in gmail but not changed locally, and sync their labels.</div>\r
121 <div><br></div><div>I&#39;m sure it won&#39;t work for you, but you might t=\r
122 ry it. :)</div><div><br></div><div>source is at <a href=3D"http://alexbl.ne=\r
123 t/~alexbl/imapsync.py">http://alexbl.net/~alexbl/imapsync.py</a></div><div>\r
124 <br></div><div>p.s. I also ran into an issue with the notmuch python bindin=\r
125 gs where I had to wrap every c_void_p in POINTER() or it would segfault for=\r
126  any method that tried to use a pointer. Also the sed command that tries to=\r
127  build notmuch.sym doesn&#39;t work on freebsd, i changed it to work, but i=\r
128 &#39;m pretty sure it won&#39;t work on linux anymore. :) I wonder if using=\r
129  ctags might actually work for that.</div>\r
130 <div><br></div><div>alex</div>\r
131 \r
132 --20cf3079b6ee70134e04aabe6909--\r