Re: [PATCH] contrib: pick: bugfix when trying to show a non-message
authorAustin Clements <amdragon@MIT.EDU>
Fri, 9 Nov 2012 17:53:53 +0000 (12:53 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:28 +0000 (09:50 -0800)
19/dd49c47dfb18bcbd9d730ad517e5d345268175 [new file with mode: 0644]

diff --git a/19/dd49c47dfb18bcbd9d730ad517e5d345268175 b/19/dd49c47dfb18bcbd9d730ad517e5d345268175
new file mode 100644 (file)
index 0000000..92b1105
--- /dev/null
@@ -0,0 +1,103 @@
+Return-Path: <amdragon@mit.edu>\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 496D4431FB6\r
+       for <notmuch@notmuchmail.org>; Fri,  9 Nov 2012 09:53:59 -0800 (PST)\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 sRoVq347VHsI for <notmuch@notmuchmail.org>;\r
+       Fri,  9 Nov 2012 09:53:57 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU\r
+       [18.7.68.37])\r
+       by olra.theworths.org (Postfix) with ESMTP id 365DB431FAE\r
+       for <notmuch@notmuchmail.org>; Fri,  9 Nov 2012 09:53:57 -0800 (PST)\r
+X-AuditID: 12074425-b7fcc6d00000091f-26-509d433464d7\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 64.10.02335.4334D905; Fri,  9 Nov 2012 12:53:56 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id qA9HrtPv031420; \r
+       Fri, 9 Nov 2012 12:53:56 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qA9Hrsnk012538\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Fri, 9 Nov 2012 12:53:55 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1TWsmA-0005wZ-0h; Fri, 09 Nov 2012 12:53:54 -0500\r
+Date: Fri, 9 Nov 2012 12:53:53 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [PATCH] contrib: pick: bugfix when trying to show a non-message\r
+Message-ID: <20121109175353.GI22284@mit.edu>\r
+References: <1351797983-19707-1-git-send-email-markwalters1009@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1351797983-19707-1-git-send-email-markwalters1009@gmail.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42IRYrdT0TVxnhtgsOaopsXquTwW12/OZHZg\r
+       8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4Mk4cnsJUcIujovnPL7YGxlb2LkZODgkBE4m9\r
+       s2+xQdhiEhfurQeyuTiEBPYxSiz80MAC4axnlHjf2MgO4ZxgkjjbNQPKWcIo8e7kIqAeDg4W\r
+       ARWJJc2iIKPYBDQktu1fzghiiwjoSNw+tABsHbOAtMS3381MILawgI/Eg40TmUFsXqCa3puT\r
+       WEBsIQFPie+zF7FCxAUlTs58wgLRqyVx499LJpBVIHOW/+MACXMKeEn0P10A9oEo0AVTTm5j\r
+       m8AoNAtJ9ywk3bMQuhcwMq9ilE3JrdLNTczMKU5N1i1OTszLSy3StdDLzSzRS00p3cQIDmoX\r
+       1R2MEw4pHWIU4GBU4uHd8Wh2gBBrYllxZe4hRkkOJiVR3vWOcwOE+JLyUyozEosz4otKc1KL\r
+       DzFKcDArifBOZgLK8aYkVlalFuXDpKQ5WJTEeW+k3PQXEkhPLEnNTk0tSC2CycpwcChJ8Bo4\r
+       ATUKFqWmp1akZeaUIKSZODhBhvMADbcEqeEtLkjMLc5Mh8ifYtTlOPpm7kNGIZa8/LxUKXFe\r
+       XZAiAZCijNI8uDmwZPSKURzoLWFeIZAqHmAig5v0CmgJE9CSxiNzQJaUJCKkpBoY19VYz7G3\r
+       dHXcePjnrbPWDH+9+d4lHtX2/avwlsV91zXt2uVmXMpOdy+sOH46smYD3/QIT+tcZvfsiYUb\r
+       LXmPMtWzemvGmytGGzb82euUEXr7a8uihXwqTHW9dyt41Terba78o5fvfvvW5ZP3vgq6vK/M\r
+       nh9+9PV9q6tTl/OEtHK01D2uzV2kxFKckWioxVxUnAgArzUMZyEDAAA=\r
+Cc: notmuch@notmuchmail.org\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, 09 Nov 2012 17:53:59 -0000\r
+\r
+Quoth Mark Walters on Nov 01 at  7:26 pm:\r
+> If the user pressed return on the end result status line it gave a\r
+> blank message. Modify the function notmuch-pick-get-message-id to\r
+> return nil rather than an empty message-id in this case to fix this.\r
+> ---\r
+>  contrib/notmuch-pick/notmuch-pick.el |    4 +++-\r
+>  1 files changed, 3 insertions(+), 1 deletions(-)\r
+> \r
+> diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
+> index 15ac5e8..1886469 100644\r
+> --- a/contrib/notmuch-pick/notmuch-pick.el\r
+> +++ b/contrib/notmuch-pick/notmuch-pick.el\r
+> @@ -241,7 +241,9 @@ Some useful entries are:\r
+>  \r
+>  (defun notmuch-pick-get-message-id ()\r
+>    "Return the message id of the current message."\r
+> -  (concat "id:\"" (notmuch-pick-get-prop :id) "\""))\r
+> +  (let ((id (notmuch-pick-get-prop :id)))\r
+> +    (when id\r
+> +      (concat "id:\"" id "\""))))\r
+\r
+There's another bug here.  The ID query should be constructed with\r
+notmuch-id-to-query so it gets properly escaped.\r
+\r
+>  \r
+>  (defun notmuch-pick-get-match ()\r
+>    "Return whether the current message is a match."\r