database error
[notmuch-archives.git] / 96 / e4e3b1d5c5b9b8bf09c081ee9a6244ce7c3c01
1 Return-Path: <jani@nikula.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 6B712431FB6\r
6         for <notmuch@notmuchmail.org>; Mon,  2 Apr 2012 12:46:24 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 mroopGnhPzuG for <notmuch@notmuchmail.org>;\r
16         Mon,  2 Apr 2012 12:46:23 -0700 (PDT)\r
17 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
18         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 3F102431FAE\r
21         for <notmuch@notmuchmail.org>; Mon,  2 Apr 2012 12:46:23 -0700 (PDT)\r
22 Received: by bkwj4 with SMTP id j4so2953743bkw.26\r
23         for <notmuch@notmuchmail.org>; Mon, 02 Apr 2012 12:46:20 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=from:to:subject:in-reply-to:references:date:message-id:mime-version\r
27         :content-type:x-gm-message-state;\r
28         bh=AyRYYx2Cgkukv0pWk4nXMeBpndgFXRUVMBBnEcfIzRk=;\r
29         b=Cw6uY2AMSPM0/lrnPMJkxsyAfByxFBNFMDEe30qQI3EGP53ZHXVFXSzzzDjJOBdHBs\r
30         CEJSHu1qplWZ0d9/A1UUMiNbMhDcwbXYtVdVcYe+F8xLSw7eDXKK1z544F2SxcRdxfep\r
31         gwzP2mQFwMlaNAiVeX9cVCg0mYX560lVFuH5YG4dm7kPaVIX658wUogxKJukYBwRzYJQ\r
32         m5lvXwCF96T3lGJVOY+pYjcnzhw0+Y+Y3NGEkYhtkEDuc21SjptAtSLnOzzMa1kq71jk\r
33         1YB/2fKc1e5LEcK5PuKWrnVJXqrkWAtFSR7rU4M32iceiLnx3k5utJ4DnHmvC5s+EcDF\r
34         qluA==\r
35 Received: by 10.205.122.77 with SMTP id gf13mr4432300bkc.15.1333395980070;\r
36         Mon, 02 Apr 2012 12:46:20 -0700 (PDT)\r
37 Received: from localhost (dsl-hkibrasgw4-fe4fdc00-105.dhcp.inet.fi.\r
38         [80.220.79.105])\r
39         by mx.google.com with ESMTPS id s16sm40849495bkt.3.2012.04.02.12.46.17\r
40         (version=SSLv3 cipher=OTHER); Mon, 02 Apr 2012 12:46:18 -0700 (PDT)\r
41 From: Jani Nikula <jani@nikula.org>\r
42 To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
43  notmuch@notmuchmail.org\r
44 Subject: Re: [PATCH 6/8] cli: add support for batch tagging operations to\r
45         "notmuch tag"\r
46 In-Reply-To: <87wr5y3ttw.fsf@servo.finestructure.net>\r
47 References: <cover.1333231401.git.jani@nikula.org>\r
48         <f360a40bed50208d146aee8b06946b1b8315e818.1333231401.git.jani@nikula.org>\r
49         <87wr5y3ttw.fsf@servo.finestructure.net>User-Agent:\r
50         Notmuch/0.12+81~g839a805 (http://notmuchmail.org) Emacs/23.3.1\r
51         (i686-pc-linux-gnu)\r
52 Date: Mon, 02 Apr 2012 22:46:15 +0300\r
53 Message-ID: <87bon9apdk.fsf@nikula.org>\r
54 MIME-Version: 1.0\r
55 Content-Type: text/plain; charset=us-ascii\r
56 X-Gm-Message-State:\r
57  ALoCoQkJ2UAQJhZZJTKxtojgBia6aVhDDp+MNpGS/+SsMlYO56U5nmwTHjFxiGxbXC6JcEdGa3nV\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Mon, 02 Apr 2012 19:46:24 -0000\r
71 \r
72 Jameson Graef Rollins <jrollins@finestructure.net> writes:\r
73 \r
74 > On Sat, Mar 31 2012, Jani Nikula <jani@nikula.org> wrote:\r
75 >> Add support for batch tagging operations through stdin to "notmuch\r
76 >> tag". This can be enabled with the new --stdin command line option to\r
77 >> "notmuch new". The input must consist of lines of the format:\r
78 >>\r
79 >> T +<tag>|-<tag> [...] [--] <search-terms>\r
80 >\r
81 > Hey, Jani.  I can understand why you're going for this form, since it\r
82 > mimics the command line arguments for tag and you want to be able to tag\r
83 > for arbitrary searches, but I must say that I find it unappealing that\r
84 > this functionality is *so* similar to that of notmuch restore, but the\r
85 > file format is totally different.  Can't we unify all of this in a\r
86 > better way?\r
87 \r
88 Hi Jameson -\r
89 \r
90 Thanks for your comments. The intent is to converge notmuch tag and\r
91 restore file formats, and reuse the code between them. The above is the\r
92 proposed format for both, but I see that I failed to mention the future\r
93 plans.\r
94 \r
95 This actually started from David's dump/restore rework [1]. I wanted to\r
96 have batch tagging, and realized his proposed format wouldn't work for\r
97 that. There was some discussion about this on IRC, and we settled on the\r
98 above format as a starting point. And now would be the time to comment\r
99 on the format, if you have any issues with it! ;)\r
100 \r
101 > This patch series seems to beg that we actually just unify the tag and\r
102 > restore functions in to one thing.  They're really just doing the same\r
103 > thing.  If we extended restore to accept a search-term instead of a\r
104 > message id they would in fact be identical.\r
105 >\r
106 > The more I think about it the more it makes sense to me that we just\r
107 > merge tag and restore, and extend the input file format to be able to\r
108 > accept search terms.  It just doesn't make sense to have these two\r
109 > interfaces that do basically the exact same thing but in a slightly\r
110 > divergent way.\r
111 \r
112 I totally agree on this goal. The dump/restore follow-up part is a\r
113 work-in-progress in my local tree. At least initially, the format would\r
114 be the same for tag and restore, but with the following subtle\r
115 differences:\r
116 \r
117 1) notmuch restore will only accept an id:message-id style query to be\r
118    able to warn about messages present in the dump file but missing in\r
119    the database. This is because dump/restore is primarily a\r
120    backup/restore style operation.\r
121 \r
122 2) Partly because of the above, and partly because of notmuch restore\r
123    --accumulate vs. not, the query/tagging optimizations will have to be\r
124    different.\r
125 \r
126 The rough idea is that both notmuch tag and restore would use the same\r
127 file parsing (tag_file() introduced in this series), but notmuch tag\r
128 would use tag_query() in notmuch-tag.c for tagging, and notmuch restore\r
129 would use tag_message() in notmuch-restore.c for tagging.\r
130 \r
131 > and btw, according to comments in the code 'T' is supposed to stand for\r
132 > the action, "tag" in this case.  What other actions do you imagine?\r
133 \r
134 This was actually David's idea. It allows extensibility in the format.\r
135 \r
136 Thanks again for your interest, and sorry about not opening up the\r
137 future plans up front.\r
138 \r
139 \r
140 BR,\r
141 Jani.\r
142 \r
143 \r
144 [1] id:"1324214111-32079-1-git-send-email-david@tethera.net"\r