--- /dev/null
+Return-Path: <keevan@fastmail.fm>\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 5078E431FAF\r
+ for <notmuch@notmuchmail.org>; Fri, 6 Sep 2013 15:15:34 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, 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 F7XwbwihtDpK for <notmuch@notmuchmail.org>;\r
+ Fri, 6 Sep 2013 15:15:30 -0700 (PDT)\r
+Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com\r
+ [66.111.4.27])\r
+ (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 0C3B2431FAE\r
+ for <notmuch@notmuchmail.org>; Fri, 6 Sep 2013 15:15:30 -0700 (PDT)\r
+Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41])\r
+ by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 9F05A20B09;\r
+ Fri, 6 Sep 2013 18:15:22 -0400 (EDT)\r
+Received: from frontend2 ([10.202.2.161])\r
+ by compute1.internal (MEProxy); Fri, 06 Sep 2013 18:15:22 -0400\r
+DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=8t8.us; h=date\r
+ :from:to:cc:subject:message-id:mime-version:content-type; s=\r
+ mesmtp; bh=N81VV1MMpBzvj+z/pvDFUWm4wKc=; b=svjk/y+RKcvthNN7M2sno\r
+ E6lXbH4TqiLuinxhv20tlkaScKPfcJrUiU3+RX6nBXdRTrwa2usKKfwhQ2lm8Jyy\r
+ Hkyprx9NpFl45onbnR3rEns0diB1LtD213JjtD902wbzZtVgWxK3PumOACoqa9Y+\r
+ /RKvr0vaJMfk+ZJ7lILjQ8=\r
+DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=\r
+ messagingengine.com; h=date:from:to:cc:subject:message-id\r
+ :mime-version:content-type; s=smtpout; bh=N81VV1MMpBzvj+z/pvDFUW\r
+ m4wKc=; b=Db/qAamkPu7MEhBomGe9lffMD/WcqUEaPP1c8LzSlVocO4RgbcRcVV\r
+ UBVXempYZ3kLpeaQLuNvatSTV4gDDsk0jA+180Z8HwqWuR0mMDcTXtgHCvVRmHHY\r
+ YZhqVict6fXsiJyaK60LTFD6bo1E2glFqT6AOuI6do4w9E31LcjyI=\r
+X-Sasl-enc: Bm/byO7589pEX8oC3HYtFB+5RMCmibKjViypJs/cB6Sq 1378505721\r
+Received: from localhost (unknown [97.125.94.9])\r
+ by mail.messagingengine.com (Postfix) with ESMTPA id F04C2680143;\r
+ Fri, 6 Sep 2013 18:15:21 -0400 (EDT)\r
+Date: Fri, 6 Sep 2013 15:15:20 -0700\r
+From: "Kevin J. McCarthy" <kevin@8t8.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/1] notmuch-mutt: Fix tagging issues\r
+Message-ID: <20130906221520.GC4226@zaogao.lan>\r
+Mail-Followup-To: notmuch@notmuchmail.org,\r
+ Stefano Zacchiroli <zack@upsilon.cc>, Jason Miller <jason@milr.com>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; micalg=pgp-sha256;\r
+ protocol="application/pgp-signature"; boundary="pQhZXvAqiZgbeUkD"\r
+Content-Disposition: inline\r
+OpenPGP: id=B6B1CD9613699FB8;\r
+ url=http://www.8t8.us/configs/13699FB8.asc.pubkey; preference=sign\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\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: Fri, 06 Sep 2013 22:15:34 -0000\r
+\r
+\r
+--pQhZXvAqiZgbeUkD\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: quoted-printable\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
+ 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/notmu=\r
+ch-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\r
+ system("notmuch tag "\r
+- . shell_quote(join(' ', @_))\r
+- . " id:$mid");\r
++ . shell_quote(@_)\r
++ . " -- "\r
++ . shell_quote("id:$mid"));\r
+ }\r
+=20\r
+ sub die_usage() {\r
+--=20\r
+1.8.4.rc3\r
+\r
+\r
+--pQhZXvAqiZgbeUkD\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: Digital signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.14 (GNU/Linux)\r
+\r
+iQEcBAEBCAAGBQJSKlP4AAoJELaxzZYTaZ+4QJAIAK9yWz1lV31ctIbjKHfcSuob\r
+tD1lj7tBqjIzEbYKC5N9FmBQXUV7/z1JlIeMW2asLQ1SklZubZ8OJvGTh8FsDiUE\r
+HvFqnUbC+Za39DQnnk45slON2QmSBkfhEAwhxkWAqSMj6H58FWBDe0EWw6llLqjo\r
+KCHT/OdMsuFzUjDRLWiLr+fnZ+m9VcbNZHii8E14dxn1rm6J8KHbtuE+5qlOy1am\r
+cWBer8TjRN3mxDmKSx9vKMLyRxsuZJU6vttJ0oblZHfHTXeVsvpBSWThKnoqux+T\r
+t7hDLuumqrpVBnG0GsH4xasM5I9utJ8UQPN74YsyWl9tZE5mwNagKe2bjz65xMU=\r
+=ztJe\r
+-----END PGP SIGNATURE-----\r
+\r
+--pQhZXvAqiZgbeUkD--\r