[PATCH v2] contrib: pick: bugfix when trying to show a non-message
authorMark Walters <markwalters1009@gmail.com>
Sat, 10 Nov 2012 15:45:50 +0000 (15:45 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:29 +0000 (09:50 -0800)
7b/42256d30f3da77ea846cd6f622b283e084ad02 [new file with mode: 0644]

diff --git a/7b/42256d30f3da77ea846cd6f622b283e084ad02 b/7b/42256d30f3da77ea846cd6f622b283e084ad02
new file mode 100644 (file)
index 0000000..7e537ee
--- /dev/null
@@ -0,0 +1,98 @@
+Return-Path: <markwalters1009@gmail.com>\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 B5CC7431FB6\r
+       for <notmuch@notmuchmail.org>; Sat, 10 Nov 2012 07:45:56 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.7\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.7 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       FREEMAIL_REPLY=2.499, 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 PVJ83dmwY9g0 for <notmuch@notmuchmail.org>;\r
+       Sat, 10 Nov 2012 07:45:56 -0800 (PST)\r
+Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com\r
+ [74.125.82.45])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 27070431FAF   for <notmuch@notmuchmail.org>; Sat, 10 Nov 2012 07:45:56 -0800\r
+ (PST)\r
+Received: by mail-wg0-f45.google.com with SMTP id dq12so2670600wgb.2\r
+       for <notmuch@notmuchmail.org>; Sat, 10 Nov 2012 07:45:54 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer;\r
+       bh=oBU6P/gGmysGtvnjbgtkEp2rEFzM9E2NDJYblO1ZzHE=;\r
+       b=xU1GVcO42+plbAsG1YD0PzVU+6H5cqAWcI71wwwjx1JCgXeQsE/zChOKdW9mvmMBpt\r
+       eybp7Tbms3H/qvx9QG2RD4naYnbvre2IbYrKnl1OnJ7f9XfQA5BjgNoWVt3d3rK66KrX\r
+       G3RsLV5egntmygVE4+TjbXsn5tf8zAifL8OsF1VHYF+EcssylDaEvWEbjQ9nvCjqFVAT\r
+       7LW8sLlSOyXJJW0m6eql3OYjT8DDwSj/H/ESbMUcl5hC+n3M8fwIFE/dFwlLcXVOTC0v\r
+       +HZ2WvQJs73v481J72n4uLLh1kNXhd+YNhnubst1K1XwJMXSZTNsVp4K1gdn0zwh9+yy\r
+       AW8w==\r
+Received: by 10.216.201.28 with SMTP id a28mr6270329weo.74.1352562353333;\r
+       Sat, 10 Nov 2012 07:45:53 -0800 (PST)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+       by mx.google.com with ESMTPS id bn7sm2795634wib.8.2012.11.10.07.45.51\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sat, 10 Nov 2012 07:45:52 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2] contrib: pick: bugfix when trying to show a non-message\r
+Date: Sat, 10 Nov 2012 15:45:50 +0000\r
+Message-Id: <1352562350-8219-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\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, 10 Nov 2012 15:45:56 -0000\r
+\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
+This also fixes a bug in the (lack of) quoting of the id string.\r
+---\r
+\r
+Version 1 is at\r
+id:1351797983-19707-1-git-send-email-markwalters1009@gmail.com\r
+\r
+This version changes the `when' to and `if' and adds the fix for the\r
+quoting.\r
+\r
+Best wishes\r
+\r
+Mark\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..bbfa6fb 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
++    (if id\r
++      (notmuch-id-to-query id))))\r
\r
+ (defun notmuch-pick-get-match ()\r
+   "Return whether the current message is a match."\r
+-- \r
+1.7.9.1\r
+\r