Re: [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin"
authorJani Nikula <jani@nikula.org>
Sat, 14 Apr 2012 21:07:53 +0000 (00:07 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:24 +0000 (09:46 -0800)
3e/63f0ee9ba257a6ad737323e96a5509ee62b8c9 [new file with mode: 0644]

diff --git a/3e/63f0ee9ba257a6ad737323e96a5509ee62b8c9 b/3e/63f0ee9ba257a6ad737323e96a5509ee62b8c9
new file mode 100644 (file)
index 0000000..f0fc135
--- /dev/null
@@ -0,0 +1,119 @@
+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 8238C431FAF\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 14:08:00 -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 OzCN4Oi4oKe0 for <notmuch@notmuchmail.org>;\r
+       Sat, 14 Apr 2012 14:07:59 -0700 (PDT)\r
+Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
+       [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 8D489431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 14:07:59 -0700 (PDT)\r
+Received: by lbdb5 with SMTP id b5so209047lbd.26\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 14:07:57 -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=gjmilRSK9VpeQw12soVGWPOsxZqIZqILR+xwf7F76qg=;\r
+       b=SKA+35VkydQUQKPLt/wbEKsdFiSxXtCbVSIG0jaqWSeBe2917KIqyrpwbe9LlqlJAk\r
+       SQ7yoXyXTSg/icnrLfNaQwDZ4PLGkwR7YzjBy2NzsSYY7+D+eQccjISHj6CApxd35ECp\r
+       RSjPKU3xXXsYR+nAtb+E032rPonRW9iaUxZyUHnKqMPhiKNb+BROwhkVh/I9dqrw3ga1\r
+       OhECn2HLFQdyDT0XuzfyN/F7eu3vPjO/oz45Y0XRBheR56Rv/jiGWa3oD4NHyI9rqHxS\r
+       oDomSQNMMtizVqqyyJ3aL7J0puhl2j3Yh1V0kGIHQq/K4ELdveu32D1GvbSxDutBPIW3\r
+       JiOw==\r
+Received: by 10.152.129.137 with SMTP id nw9mr5601976lab.48.1334437677714;\r
+       Sat, 14 Apr 2012 14:07:57 -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 ox7sm17565061lbb.17.2012.04.14.14.07.55\r
+       (version=SSLv3 cipher=OTHER); Sat, 14 Apr 2012 14:07:56 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin"\r
+In-Reply-To: <87d37ays85.fsf@servo.finestructure.net>\r
+References: <cover.1334404979.git.jani@nikula.org>\r
+       <87d37ays85.fsf@servo.finestructure.net>User-Agent:\r
+       Notmuch/0.12+81~g839a805 (http://notmuchmail.org) Emacs/23.3.1\r
+       (i686-pc-linux-gnu)\r
+Date: Sun, 15 Apr 2012 00:07:53 +0300\r
+Message-ID: <87ty0mdnti.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQkDsgaK8XSM7ekX7NfU3IjVRQXrXwVmAtVqJKd4Rq+g5dbKvRqz1mmeoKj7/Rozw5jpRoVg\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: Sat, 14 Apr 2012 21:08:00 -0000\r
+\r
+Jameson Graef Rollins <jrollins@finestructure.net> writes:\r
+\r
+> On Sat, Apr 14 2012, Jani Nikula <jani@nikula.org> wrote:\r
+>> This series adds support for batch tagging through stdin to "notmuch\r
+>> tag". This should be useful and efficient for e.g. initial tagging\r
+>> scripts. Also, this adds locking around a batch of tag changes, which is\r
+>> also useful for initial tagging scripts. See the test patch for an\r
+>> example using a "here document".\r
+>\r
+> My issues from v1 still stand.  I would rather see some unification with\r
+> the existing tag file format, rather than introduce a second format,\r
+> with it's increased maintenance burden and confusion to users.  Either\r
+> that or a more general batch command interface.\r
+\r
+The existing dump/restore file format is a dead end. It fails\r
+magnificently with tags and message-ids that have spaces or some other\r
+special characters in them. It doesn't support removal of tags. There's\r
+zero room for extensibility. I can't imagine how that could be used for\r
+notmuch tag.\r
+\r
+David originally wrote the dump/restore patches\r
+id:"1324214111-32079-1-git-send-email-david@tethera.net" to add a\r
+"notmuch" format (yes, a second format) in addition to the "sup" format\r
+we currently have, to fix the issues with special characters. That too\r
+lacked features to support batch tagging in notmuch new. The format\r
+proposed here would fix the issues and work with notmuch tag, and it\r
+would be obvious to use for anyone who has used notmuch tag.\r
+\r
+I see a general batch command interface overkill. Too many problems to\r
+solve for little gain (see the previous thread for details). What other\r
+notmuch commands than tag would really benefit from it? If you want to\r
+do search or show or whatever, the general batch command interface to\r
+use is /bin/sh.\r
+\r
+For notmuch tag, particularly in connection with notmuch new, there's a\r
+clear benefit in having a batch mode: if you have "new" in new.tags, and\r
+do initial tagging on the "new" tagged messages (e.g. in post-new hook),\r
+you don't want anyone messing with the database while you're processing\r
+the messages tagged "new". The batch tagging of this series keeps the db\r
+locked for the duration of such initial tagging.\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. If that is deemed to be what is wanted, that's okay too. I can\r
+share my WIP patches for dump/restore, and focus on something else.\r
+\r
+\r
+BR,\r
+Jani.\r