[PATCH 6/8] CLI: refactor dumping of tags.
[notmuch-archives.git] / 2e / 68e17adcd7f6d778f26962fb6e464837ce145a
1 Return-Path: <prvs=jrosenthal=7726e989f@jhu.edu>\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 DE60B4196F2\r
6         for <notmuch@notmuchmail.org>; Sat, 12 Jun 2010 06:22:59 -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: -4.2\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham\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 5rCj4XpYmC6X for <notmuch@notmuchmail.org>;\r
16         Sat, 12 Jun 2010 06:22:49 -0700 (PDT)\r
17 Received: from ipex4.johnshopkins.edu (ipex4.johnshopkins.edu\r
18         [128.220.161.141])\r
19         by olra.theworths.org (Postfix) with ESMTP id 7702F431FC1\r
20         for <notmuch@notmuchmail.org>; Sat, 12 Jun 2010 06:22:49 -0700 (PDT)\r
21 X-IronPort-AV: E=Sophos;i="4.53,408,1272859200"; d="scan'208";a="373872188"\r
22 Received: from c-69-255-36-229.hsd1.md.comcast.net (HELO lucky.home)\r
23         ([69.255.36.229])\r
24         by ipex4.johnshopkins.edu with ESMTP/TLS/AES256-SHA;\r
25         12 Jun 2010 09:22:44 -0400\r
26 Received: from jkr by lucky.home with local (Exim 4.71)\r
27         (envelope-from <jrosenthal@jhu.edu>)\r
28         id 1ONQfN-0000hk-7D; Sat, 12 Jun 2010 09:22:29 -0400\r
29 From: Jesse Rosenthal <jrosenthal@jhu.edu>\r
30 To: David Bremner <bremner@unb.ca>, Christoph Groth <cwg@falma.de>\r
31 Subject: Re: syncing mail by simply syncing the filesystem\r
32 In-Reply-To: <87vd9o5rtj.fsf@rocinante.cs.unb.ca>\r
33 References: <87631obu64.fsf@falma.de> <87vd9o5rtj.fsf@rocinante.cs.unb.ca>\r
34 User-Agent: Notmuch/0.3.1-58-g6607fd6 (http://notmuchmail.org) Emacs/23.2.1\r
35         (i486-pc-linux-gnu)\r
36 Date: Sat, 12 Jun 2010 09:22:29 -0400\r
37 Message-ID: <87y6eke67e.fsf@lucky.home>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain; charset=us-ascii\r
40 Cc: notmuch@notmuchmail.org\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Sat, 12 Jun 2010 13:23:00 -0000\r
54 \r
55 > Another, potentially more elegant approach is to use "notmuch remote"\r
56 > scripts written by Jesse Rosenthal. I haven't done this myself, but I\r
57 > did think was feasible when I looked at them.\r
58 \r
59 I'd certainly be happy to get some feedback on this idea, but I'm not\r
60 sure if it's the right tool for this problem, since it deals with\r
61 namespaces and he wants the universal namespace. In other words, I think\r
62 it mainly reduces to 'notmuch dump' and 'curl' there (though I could be\r
63 forgetting some cleverness on my part).\r
64 \r
65 > On Sat, 12 Jun 2010 09:13:07 +0200, Christoph Groth <cwg@falma.de> wrote:\r
66 > > The ideal setup would be one which would allow to use any of my\r
67 > > computers independently (for example when I'm away with my laptop).\r
68 > > When necessary, the local mail stores would be synchronized by simply\r
69 > > syncing the home directory (I'm using unison for this).\r
70 \r
71 Christoph -- some other ideas to think about:\r
72 \r
73 1. If your other computers will have a consistent fast internet\r
74 connection (or a sufficient connection to use IMAP) consider remote\r
75 usage, keeping your database on one computer:\r
76 \r
77 http://notmuchmail.org/remoteusage/\r
78 \r
79 2. You could brute-force it. Include a nm_dump file as one of your\r
80 unison paths, along with your Maildir, then always run:\r
81 \r
82 notmuch dump > nm_dump\r
83 unison\r
84 notmuch restore nm_dump\r
85 \r
86 If you take a bit of care in how you tell unison nm_dump files, this\r
87 also has the benefit of not just assuming the most recent state is the\r
88 correct one. But the syntax is pretty easy, so that shouldn't be a\r
89 problem. I don't think unison lets you run hooks (I could be wrong), but\r
90 this could be easily scriptable.\r
91 \r
92 2a. Just a thought -- would merging be easier if you used git/hg instead\r
93 of unison? Just make sure to gitignore your notmuch db.\r
94 \r
95 3. Have an IMAP server on one computer, a notmuch-computer on\r
96 another. Have rsync passively pull down from your IMAP maildir. This\r
97 doesn't synchronize tags, but it might be good enough if you just want\r
98 to check on your phone occasionally.\r
99 \r
100 FWIW, I have a combination of #3 and #1 above.\r
101 \r
102 University --getmail/maildrop--> IMAP server --rsync--> home\r
103                                                         / \\r
104                                                        remote\r
105                                                       /     \\r
106                                                    work     laptop\r
107 \r
108 Anyway, just some ideas. I'm sure there are plenty of others. (Sort of\r
109 curious to see them, since I'm sure there has been all sorts of\r
110 interesting hacks and workarounds). Everything above is sort of a hacks,\r
111 but it all works well enough for me. Hopefully there will be a canonical\r
112 solution to this sooner rather than later, though.\r
113 \r
114 Best,\r
115 Jesse\r