--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\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 493C7431FAF\r
+ for <notmuch@notmuchmail.org>; Sat, 7 Sep 2013 01:28:18 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ 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 qJHHNAgNdv3h for <notmuch@notmuchmail.org>;\r
+ Sat, 7 Sep 2013 01:28:05 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 82884431FAE\r
+ for <notmuch@notmuchmail.org>; Sat, 7 Sep 2013 01:28:05 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id C908D10005E;\r
+ Sat, 7 Sep 2013 11:27:55 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: "Kevin J. McCarthy" <kevin@8t8.us>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/1] notmuch-mutt: Fix tagging issues\r
+In-Reply-To: <20130906221520.GC4226@zaogao.lan>\r
+References: <20130906221520.GC4226@zaogao.lan>\r
+User-Agent: Notmuch/0.16+60~gbdcc747 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sat, 07 Sep 2013 11:27:55 +0300\r
+Message-ID: <m2mwnprq7o.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+Cc: Stefano Zacchiroli <zack@upsilon.cc>\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, 07 Sep 2013 08:28:18 -0000\r
+\r
+On Sat, Sep 07 2013, "Kevin J. McCarthy" <kevin@8t8.us> wrote:\r
+\r
+> This patch fixes three issues with "notmuch-mutt tag":\r
+>\r
+> 1. The message-id was not shell quoted.\r
+> Thanks to Jason Miller for the bug report and patch.\r
+>\r
+> 2. The tags passed into tag_action() were not being properly quoted.\r
+> The "join before shell_quote" was combining multiple tags into a\r
+> single argument to notmuch tag: '+one -two -three' instead of\r
+> '+one' '-two' '-three'. Note that shell_quote() will join array\r
+> arguments with a space after quoting each, so a join afterwards was\r
+> not needed.\r
+>\r
+> 3. A "--" was added between the tags and search-term as shown in the\r
+> current notmuch-tag man page.\r
+\r
+The patch looks good to me, just that I cannot test it. +1.\r
+\r
+If it weren't inconsistent what is there now a simpler alternative could be:\r
+\r
+system qw/notmuch tag/, @_, '--', "id:$mid";\r
+\r
+or even\r
+\r
+exec qw/notmuch tag/, @_, '--', "id:$mid";\r
+\r
+\r
+... as these bypasses the intermediate shell altogether.\r
+\r
+Tomi\r
+\r
+\r
+> ---\r
+> contrib/notmuch-mutt/notmuch-mutt | 5 +++--\r
+> 1 file changed, 3 insertions(+), 2 deletions(-)\r
+>\r
+> diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/not=\r
+much-mutt\r
+> index c69b35c..e5d6848 100755\r
+> --- a/contrib/notmuch-mutt/notmuch-mutt\r
+> +++ b/contrib/notmuch-mutt/notmuch-mutt\r
+> @@ -114,8 +114,9 @@ sub tag_action(@) {\r
+> defined $mid or die "notmuch-mutt: cannot find Message-Id, abort.\n";\r
+>=20=20\r
+> system("notmuch tag "\r
+> - . shell_quote(join(' ', @_))\r
+> - . " id:$mid");\r
+> + . shell_quote(@_)\r
+> + . " -- "\r
+> + . shell_quote("id:$mid"));\r
+> }\r
+>=20=20\r
+> sub die_usage() {\r
+> --=20\r
+> 1.8.4.rc3\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r
+\r
+--=20\r
+"kaik on m=C3=A4nt!"\r