--- /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 56D0C431FAF\r
+ for <notmuch@notmuchmail.org>; Sun, 8 Sep 2013 08:51:07 -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 Kd50h9bsxXae for <notmuch@notmuchmail.org>;\r
+ Sun, 8 Sep 2013 08:51:01 -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 853D5431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 8 Sep 2013 08:51:01 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 2DB18100090;\r
+ Sun, 8 Sep 2013 18:50:53 +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 v2 1/1] notmuch-mutt: Fix tagging issues\r
+In-Reply-To: <20130907170757.GA407@zaogao.lan>\r
+References: <20130906221520.GC4226@zaogao.lan>\r
+ <m2mwnprq7o.fsf@guru.guru-group.fi>\r
+ <20130907155748.GD4226@zaogao.lan>\r
+ <20130907170757.GA407@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: Sun, 08 Sep 2013 18:50:53 +0300\r
+Message-ID: <m261ubwbvm.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: Sun, 08 Sep 2013 15:51:07 -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'.\r
+>\r
+> 3. A "--" was added between the tags and search-term as shown in the\r
+> current notmuch-tag man page.\r
+>\r
+> Thanks to Tomi Ollila for suggesting the simple fix of using\r
+> the list form of system(), which bypasses the shell.\r
+> ---\r
+\r
+LGTM.\r
+\r
+Tomi\r
+\r
+> contrib/notmuch-mutt/notmuch-mutt | 4 +---\r
+> 1 file changed, 1 insertion(+), 3 deletions(-)\r
+>\r
+> diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/not=\r
+much-mutt\r
+> index c69b35c..4969e4b 100755\r
+> --- a/contrib/notmuch-mutt/notmuch-mutt\r
+> +++ b/contrib/notmuch-mutt/notmuch-mutt\r
+> @@ -113,9 +113,7 @@ sub tag_action(@) {\r
+> my $mid =3D get_message_id();\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
+> + system("notmuch", "tag", @_, "--", "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