Re: notmuch.readthedocs.org
[notmuch-archives.git] / 35 / 6593242e45e6b522048ca29abbb8dc3f8cae8c
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 4EC7E429E2A\r
6         for <notmuch@notmuchmail.org>; Tue, 28 Jun 2011 13:22:37 -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.01\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.01 tagged_above=-999 required=5\r
12         tests=[T_MIME_NO_TEXT=0.01] autolearn=disabled\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 K22ykyWTR9A4 for <notmuch@notmuchmail.org>;\r
16         Tue, 28 Jun 2011 13:22:36 -0700 (PDT)\r
17 Received: from arlo.cworth.org (arlo.cworth.org [50.43.72.2])\r
18         by olra.theworths.org (Postfix) with ESMTP id C45CE429E25\r
19         for <notmuch@notmuchmail.org>; Tue, 28 Jun 2011 13:22:36 -0700 (PDT)\r
20 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
21         by arlo.cworth.org (Postfix) with ESMTP id CFDEF29A608;\r
22         Tue, 28 Jun 2011 13:22:35 -0700 (PDT)\r
23 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
24         id BFCA12541A8; Tue, 28 Jun 2011 13:22:35 -0700 (PDT)\r
25 From: Carl Worth <cworth@cworth.org>\r
26 To: Sander Boer <sanderboer@mauc.nl>, notmuch@notmuchmail.org\r
27 Subject: Re: notmuch Digest, Vol 20, Issue 57\r
28 In-Reply-To: <cuozkl367o2.fsf@mauc.nl>\r
29 References: <mailman.5.1309146869.12973.notmuch@notmuchmail.org>\r
30         <cuozkl367o2.fsf@mauc.nl>\r
31 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1\r
32         (i486-pc-linux-gnu)\r
33 Date: Tue, 28 Jun 2011 13:22:23 -0700\r
34 Message-ID: <87wrg5905c.fsf@yoom.home.cworth.org>\r
35 MIME-Version: 1.0\r
36 Content-Type: multipart/signed; boundary="=-=-=";\r
37         micalg=pgp-sha1; protocol="application/pgp-signature"\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Tue, 28 Jun 2011 20:22:37 -0000\r
51 \r
52 --=-=-=\r
53 Content-Transfer-Encoding: quoted-printable\r
54 \r
55 On Mon, 27 Jun 2011 09:43:41 +0200, Sander Boer <sanderboer@mauc.nl> wrote:\r
56 > For instance, is this a possibility sync gmail tags with notmuch tags ?\r
57 > As fas as I am aware Gmail exposes its tags through imap folders, I am\r
58 > not too thrilled about the mixing of paradigms (folders vs tags) and it\r
59 > would be great if it could be aligned.\r
60 \r
61 I'm not a gmail user myself, but I can describe some of the options\r
62 available.\r
63 \r
64 First, it's important to understand that any friction here comes from\r
65 Gmail exposing its tags as folders, (which in turn could be the lack of\r
66 availability of a more tag-aware protocol than imap).\r
67 \r
68 So, let's say you've done an imap-based fetch of all of your mail and\r
69 now have it in several folders corresponding to the various tags you\r
70 made in the Gmail interface, (and you've run "notmuch new" to create a\r
71 notmuch database of all of that).\r
72 \r
73 At that point, you can search (with current notmuch from git---and soon\r
74 to be released as notmuch 0.6) on the folder names. This allows you to\r
75 do a search based on a Gmail tag. For example, you might have an\r
76 "important" tag in Gmail which you could search with:\r
77 \r
78         notmuch search folder:important\r
79 \r
80 If you wanted to make an actual notmuch tag based on those search\r
81 results, you could do that as well:\r
82 \r
83         notmuch tag +important folder:important\r
84 \r
85 And you could even do that on a regular basis, (for example in some\r
86 script that sucks down new email from Gmail). In this case you might\r
87 want to avoid re-tagging pre-tagged mail by amending the search terms:\r
88 \r
89         notmuch tag +important folder:important and not tag:important\r
90 \r
91 (Note that this is an optimization that notmuch could be making\r
92 automatically, and that's something I'd love to see happen in notmuch at\r
93 some point.)\r
94 \r
95 Hopefully it's clear enough that you could do the above in a script that\r
96 loops over all of your existing tags.\r
97 \r
98 And if you were doing a one-time switch from Gmail to notmuch that would\r
99 be all you would need.\r
100 \r
101 I don't know if you're looking to also push tags added via some notmuch\r
102 interface back to Gmail, (does Gmail even provide a mechanism for doing\r
103 that?). If so, then you'd need something that took notmuch tags and made\r
104 copies of the message in the appropriate files. That would hopefully be\r
105 easy to script based on the output of:\r
106 \r
107         notmuch search --output=3Dfiles tag:important\r
108 \r
109 I think my short answer is that it's fairly easy to convert from Gmail\r
110 tags to notmuch tags as part of a one-time import. Doing this on a\r
111 continual basis might benefit from writing a few scripts, and I don't\r
112 know if anyone has written those scripts yet.\r
113 \r
114 Would any Gmail+notmuch users care to add anything to the conversation?\r
115 \r
116 =2DCarl\r
117 \r
118 =2D-=20\r
119 carl.d.worth@intel.com\r
120 \r
121 --=-=-=\r
122 Content-Type: application/pgp-signature\r
123 \r
124 -----BEGIN PGP SIGNATURE-----\r
125 Version: GnuPG v1.4.11 (GNU/Linux)\r
126 \r
127 iEYEARECAAYFAk4KN/8ACgkQ6JDdNq8qSWjdtgCeIju5ebRrxLfOHP4tTW6270xA\r
128 XSwAni0K6/mO6zSFeI9VyalqvgtFilzV\r
129 =0EYy\r
130 -----END PGP SIGNATURE-----\r
131 --=-=-=--\r