Re: [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin"
authorJani Nikula <jani@nikula.org>
Wed, 18 Apr 2012 18:58:38 +0000 (21:58 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:34 +0000 (09:46 -0800)
f0/dc8e4b0f4a593ebce4450161134fabeca94a36 [new file with mode: 0644]

diff --git a/f0/dc8e4b0f4a593ebce4450161134fabeca94a36 b/f0/dc8e4b0f4a593ebce4450161134fabeca94a36
new file mode 100644 (file)
index 0000000..c5eb3f4
--- /dev/null
@@ -0,0 +1,140 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id E79A1431FB6\r
+       for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 11:58:51 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id eg2ze3+b8JFk for <notmuch@notmuchmail.org>;\r
+       Wed, 18 Apr 2012 11:58:47 -0700 (PDT)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+       [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 08A46431FAE\r
+       for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 11:58:46 -0700 (PDT)\r
+Received: by lahc1 with SMTP id c1so6101134lah.26\r
+       for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 11:58:43 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:subject:in-reply-to:references:date:message-id:mime-version\r
+       :content-type:x-gm-message-state;\r
+       bh=e+B46seoLm4wBcc3ASWwsyrCg9gBRHxf45DpFX6+8UM=;\r
+       b=DcJZiXdynR945DMnDnl9am+Z22eZGG3QzE3VHzMpZ8TSV/82CFWmM0d7I3H8HJArFk\r
+       Zb1BAJhXagYIR8oE3ZARBvJXydDE6LpZxxfsOXD6MPzjOpAeWWcXlyx/hZ7DzftABPks\r
+       XCHLd6Jrs36+sSaKR4wLlyxSFXJ4D+tZdIqXwjeUZXZQrRTke+WkIu3FWxB7TA37vB0C\r
+       dBhvivCCQ+U+B2497FvVQzW182jbd9pyPjgBMhuMIqHLlm7hgNM5x0ng4nyMRPuxsvHB\r
+       +lVCFmivrSDO/uSYI3U8MlCkBHVNymvD4kVX0t/pU7uK0R/0rh49lmfBSwGQiOiDMhAV\r
+       0glA==\r
+Received: by 10.112.48.202 with SMTP id o10mr1607538lbn.25.1334775523398;\r
+       Wed, 18 Apr 2012 11:58:43 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi.\r
+       [80.220.80.68])\r
+       by mx.google.com with ESMTPS id mr15sm27124493lab.8.2012.04.18.11.58.40\r
+       (version=SSLv3 cipher=OTHER); Wed, 18 Apr 2012 11:58:41 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Bremner <david@tethera.net>,\r
+       Jameson Graef Rollins <jrollins@finestructure.net>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin"\r
+In-Reply-To: <87mx6dtd85.fsf@zancas.localnet>\r
+References: <cover.1334404979.git.jani@nikula.org>\r
+       <87d37ays85.fsf@servo.finestructure.net>\r
+       <87ty0mdnti.fsf@nikula.org>\r
+       <87mx6dtd85.fsf@zancas.localnet>User-Agent:\r
+       Notmuch/0.12+81~g839a805 (http://notmuchmail.org) Emacs/23.3.1\r
+       (i686-pc-linux-gnu)\r
+Date: Wed, 18 Apr 2012 21:58:38 +0300\r
+Message-ID: <87zka8989t.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQmmtqqJ8Pmm9VDXlVzP+ZTME7g8wahC5ojtePDbAkwVzDsB1FeJ7QFCyzThg4MOugH5sfdw\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 18 Apr 2012 18:58:52 -0000\r
+\r
+On Sun, 15 Apr 2012, David Bremner <david@tethera.net> wrote:\r
+> Jani Nikula <jani@nikula.org> writes:\r
+>\r
+>\r
+>> I'm totally fine with modifying the proposed format (e.g. change "T" to\r
+>> "tag", make things compatible with a future general batch mode), but to\r
+>> be absolutely clear: I will not implement a general batch command\r
+>> mode. \r
+>\r
+> I was thinking about the best way of making the interface extensible,\r
+> and it might be better have a kind of modal interface, where some well\r
+> defined escape at the beginning of the line introduces a mode switch.\r
+> This has two apparent advantages: it avoids duplication of redundant\r
+> information at the beginning of each line, and for input to a subcommand\r
+> it could be optional.\r
+\r
+Does it not worry you that such a modal format isn't much fun to filter\r
+with regular command line tools?\r
+\r
+> something like\r
+>\r
+> * tag\r
+> +foo +bar msg.id@blah\r
+> +glub -glog other.msg.id@blog\r
+>\r
+> vs\r
+>\r
+> * restore\r
+> foo bar msg.id@blah\r
+> glub glog other.msg.id@blog\r
+>\r
+> where a hypothetical general batch interface could take those two files\r
+> concatenated together, and the "*" lines would be optional feeding to\r
+> tag and restore respectively.\r
+\r
+Restore currently has two modes of operation: with and without\r
+--accumulate option. How would you specify that *outside* the file, if\r
+the restore was done with the hypothetical general batch interface? And\r
+if there was such an interface, we shouldn't have a dedicated restore\r
+command for restoring such dump files, should we...? (It's useful to be\r
+able to use the same dump file with/without --accumulate. See e.g. [1].)\r
+\r
+> I guess the current proposal is to have the restore format and tag\r
+> format a bit closer\r
+>\r
+> * restore\r
+> +foo +bar msg.id@blah\r
+> +glub +glog other.msg.id@blog\r
+\r
+Something like that... though in my original idea the same dump file\r
+could be fed to either tag or restore. They would interpret the file\r
+using the same routine, but perform the tagging in slightly different\r
+ways (mainly to keep restore very strict as it's a backup/restore\r
+command).\r
+\r
+> This looks like it would be a 2% space increase for my tags. I guess I\r
+> could live with that. Another option would be to have the '+' be\r
+> optional for tag as well; I suppose then tags starting with + would be\r
+> ambiguous, which is probably a bad idea.\r
+\r
+I'd like to keep the new format unambiguous if at all possible.\r
+\r
+BR,\r
+Jani.\r
+\r
+\r
+\r
+[1] http://notmuchmail.org/howto/#index5h2\r
+\r