Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / d3 / cc0166e509cbd06bf597e674df22b7ef8af6dd
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 98CC5431FBC\r
6         for <notmuch@notmuchmail.org>; Mon, 18 Jan 2010 07:12:35 -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: 0.001\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
12         tests=[BAYES_50=0.001] 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 OYaUPWnizHK4 for <notmuch@notmuchmail.org>;\r
16         Mon, 18 Jan 2010 07:12:34 -0800 (PST)\r
17 Received: from mout.perfora.net (mout.perfora.net [74.208.4.194])\r
18         by olra.theworths.org (Postfix) with ESMTP id CC541431FAE\r
19         for <notmuch@notmuchmail.org>; Mon, 18 Jan 2010 07:12:34 -0800 (PST)\r
20 Received: from homiemail-a21.g.dreamhost.com (caiajhbdcbbj.dreamhost.com\r
21         [208.97.132.119]) by mx.perfora.net (node=mxus2) with ESMTP (Nemesis)\r
22         id 0MStEz-1NNAU30eNp-00RpIY for notmuch@notmuchmail.org;\r
23         Mon, 18 Jan 2010 10:12:34 -0500\r
24 Received: from sspaeth.de (mtec-hg-docking-2-dhcp-062.ethz.ch [82.130.121.62])\r
25         by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPA id C1F9630006C\r
26         for <notmuch@notmuchmail.org>; Mon, 18 Jan 2010 07:12:31 -0800 (PST)\r
27 Received: by sspaeth.de (sSMTP sendmail emulation);\r
28         Mon, 18 Jan 2010 16:12:28 +0100\r
29 From: "Sebastian Spaeth" <Sebastian@SSpaeth.de>\r
30 To: notmuch@notmuchmail.org\r
31 Date: Mon, 18 Jan 2010 16:12:28 +0100\r
32 Message-ID: <87pr57jvkz.fsf@SSpaeth.de>\r
33 MIME-Version: 1.0\r
34 Content-Type: text/plain; charset=us-ascii\r
35 Subject: [notmuch] Introducing notmuchsync\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Mon, 18 Jan 2010 15:12:35 -0000\r
49 \r
50 Dear list,\r
51 \r
52 I really want to sync my maildir flags/folders with notmuch tags and as\r
53 I haven't seen a script to do that, I've written (the beginnings of?)\r
54 one.\r
55 \r
56 It is probably pre-alpha but I am a fan of release early, release often\r
57 and if someone finds it useful to build upon, it was already worth it. I\r
58 put the code here: http://github.com/spaetz/notmuchsync\r
59 \r
60 What does it do?\r
61 ================\r
62  - Synchronizes the "S" flag with the "unread" tag (1-way). The\r
63  synchronization direction is decided by using either --sync (change\r
64  maildir flags according to notmuch) or --revsync (change notmuch tags according to maildir). By default it always checks the mails from the previous 30\r
65  days (but can also do --all mails if you have plenty of RAM and time).\r
66  - Deletes all mail files that have the "delete" tag\r
67  - Quiet/normal/verbose logging \r
68 \r
69 Workflow\r
70 ========\r
71 1a) start out with notmuchsync -r in order to initialize the notmuch tag\r
72 database based on maildir 'S' flags. This is probably what everyone but\r
73 Carl Worth wants. :-) If the "--all" command works for you, even better,\r
74 but I doubt it as it would store all your mails in RAM.\r
75 1b) start out with not\r
76 \r
77 What needs improvment\r
78 =====================\r
79  - It's a python script in one file. The architecture might need some\r
80  cleanup. Documentation needs work too.\r
81  - It temporarily slurps in all your mails from the last 30 days into\r
82  RAM. I am waiting for "notmuchs show blah --output filename --output\r
83  tags" to improve that :). Generally the parsing of the output of\r
84  "notmuch show" is a bit hackyish with regexps at the moment.\r
85  - Support parsing "chunks" of "notmuch show" output or do several\r
86    runs for -all, using monthly intervals to make --all work.\r
87  - Support for the "T" (delete), "F" (flag), "D" (draft) tags/flags.\r
88    Should be pretty easy to add.\r
89  - Support syncing of the "inbox" tag if the mail is in a dir different\r
90  than INBOX. No clue yet how to do. Perhaps if a maildir name\r
91  corresponds to a notmuch tag name, we move the mail there?\r
92  - It seems to work for me, but is untested in environments with spaces\r
93  in paths and windows machines.\r
94  - the --doeverything command that prunes and syncs in one go\r
95 \r
96 What else\r
97 =========\r
98 - It is GPL v2.1+\r
99 - Please improve and/or fork this thing.\r
100 - If you don't like it, just ignore it. Thanks for your understanding.\r
101 \r
102 -----------------------------------------------------------------------\r
103 Usage:\r
104 -p --prune      Prune deleted mails\r
105 -s --sync       Sync from notmuch tags to maildir flags.\r
106                 By default it will only look for mails from the last 30 days.\r
107                 Use --all to look at earlier mails.\r
108                 Beware, if timestamps are more than 30 days in the\r
109                 future, \r
110                 we won't handle it.\r
111 -r --revsync    Sync tags from maildir to notmuch. See also -s.\r
112 Options:\r
113 -d               Really verbose debug oputput.\r
114 -q               Log only errors.\r
115 --dryrun         Do not really modify notmuch db or mail files\r
116                  Works together with -p -s -r\r
117 \r
118 ----------------------------------------------------------------------\r
119 \r
120 Let me know what you like or don't. If you want github contributor\r
121 right, I am willing to hand out access quite liberal. And as always:\r
122 patches welcome. :-)\r
123 \r
124 spaetz\r