Re: [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin"
[notmuch-archives.git] / d6 / 40981f0261b285b1a3f79069758aa5dbfb6a7e
1 Return-Path: <bremner@unb.ca>\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 2E515431FAF\r
6         for <notmuch@notmuchmail.org>; Sun, 15 Apr 2012 05:02: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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 KSNhzgDY5K5h for <notmuch@notmuchmail.org>;\r
16         Sun, 15 Apr 2012 05:02:36 -0700 (PDT)\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
18         (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 672F1431FAE\r
21         for <notmuch@notmuchmail.org>; Sun, 15 Apr 2012 05:02:36 -0700 (PDT)\r
22 Received: from fctnnbsc30w-156034089108.dhcp-dynamic.fibreop.nb.bellaliant.net\r
23         ([156.34.89.108] helo=zancas.localnet)\r
24         by tesseract.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32)\r
25         (Exim 4.72) (envelope-from <bremner@unb.ca>)\r
26         id 1SJO9v-0008QO-Gs; Sun, 15 Apr 2012 09:02:27 -0300\r
27 Received: from bremner by zancas.localnet with local (Exim 4.77)\r
28         (envelope-from <bremner@unb.ca>)\r
29         id 1SJO9q-0002sX-52; Sun, 15 Apr 2012 09:02:18 -0300\r
30 From: David Bremner <david@tethera.net>\r
31 To: Jani Nikula <jani@nikula.org>,\r
32         Jameson Graef Rollins <jrollins@finestructure.net>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin"\r
34 In-Reply-To: <87ty0mdnti.fsf@nikula.org>\r
35 References: <cover.1334404979.git.jani@nikula.org>\r
36         <87d37ays85.fsf@servo.finestructure.net>\r
37         <87ty0mdnti.fsf@nikula.org>\r
38 User-Agent: Notmuch/0.12+104~gf9ad237 (http://notmuchmail.org) Emacs/23.3.1\r
39         (x86_64-pc-linux-gnu)\r
40 Date: Sun, 15 Apr 2012 09:02:18 -0300\r
41 Message-ID: <87mx6dtd85.fsf@zancas.localnet>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain; charset=us-ascii\r
44 X-Spam_bar: -\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.13\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Sun, 15 Apr 2012 12:02:37 -0000\r
58 \r
59 Jani Nikula <jani@nikula.org> writes:\r
60 \r
61 \r
62 > I'm totally fine with modifying the proposed format (e.g. change "T" to\r
63 > "tag", make things compatible with a future general batch mode), but to\r
64 > be absolutely clear: I will not implement a general batch command\r
65 > mode. \r
66 \r
67 I was thinking about the best way of making the interface extensible,\r
68 and it might be better have a kind of modal interface, where some well\r
69 defined escape at the beginning of the line introduces a mode switch.\r
70 This has two apparent advantages: it avoids duplication of redundant\r
71 information at the beginning of each line, and for input to a subcommand\r
72 it could be optional.\r
73 \r
74 something like\r
75 \r
76 * tag\r
77 +foo +bar msg.id@blah\r
78 +glub -glog other.msg.id@blog\r
79 \r
80 vs\r
81 \r
82 * restore\r
83 foo bar msg.id@blah\r
84 glub glog other.msg.id@blog\r
85 \r
86 where a hypothetical general batch interface could take those two files\r
87 concatenated together, and the "*" lines would be optional feeding to\r
88 tag and restore respectively.\r
89 \r
90 I guess the current proposal is to have the restore format and tag\r
91 format a bit closer\r
92 \r
93 * restore\r
94 +foo +bar msg.id@blah\r
95 +glub +glog other.msg.id@blog\r
96 \r
97 This looks like it would be a 2% space increase for my tags. I guess I\r
98 could live with that. Another option would be to have the '+' be\r
99 optional for tag as well; I suppose then tags starting with + would be\r
100 ambiguous, which is probably a bad idea.\r
101 \r
102 d\r