[PATCH 06/11] contrib: pick: add button press helper
authorMark Walters <markwalters1009@gmail.com>
Fri, 5 Jul 2013 18:11:13 +0000 (19:11 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:55:53 +0000 (09:55 -0800)
46/e8471092136f8fc664b0e36db4a45d6f2ba1b3 [new file with mode: 0644]

diff --git a/46/e8471092136f8fc664b0e36db4a45d6f2ba1b3 b/46/e8471092136f8fc664b0e36db4a45d6f2ba1b3
new file mode 100644 (file)
index 0000000..de2953d
--- /dev/null
@@ -0,0 +1,92 @@
+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 23CA7431FDD\r
+       for <notmuch@notmuchmail.org>; Fri,  5 Jul 2013 11:12:13 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 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
+       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 EMdgM8l45xvt for <notmuch@notmuchmail.org>;\r
+       Fri,  5 Jul 2013 11:12:05 -0700 (PDT)\r
+Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com\r
+ [74.125.83.49])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ C78DF431FBC   for <notmuch@notmuchmail.org>; Fri,  5 Jul 2013 11:11:42 -0700\r
+ (PDT)\r
+Received: by mail-ee0-f49.google.com with SMTP id b57so1512761eek.8\r
+       for <notmuch@notmuchmail.org>; Fri, 05 Jul 2013 11:11:41 -0700 (PDT)\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:in-reply-to:references;\r
+       bh=VORSS5Luaounav5EfpO/eS83tjsFoRLrfuZfFcuvSUg=;\r
+       b=ti51JpZPgg6bVjdjJs+9n4Gs3ASQ1fmiYZlE0ojqksuIHQoXGgzUa+irgSsy4KcPDM\r
+       OcvKFOg7BmJIcQdUsNE3nhU76vGqWbdkDhQi58nq+1QPozFVvrSxfron5FCdSggMu4jy\r
+       bvm3qyBqyN5kixSOZcK2OmifFSfTpw7djQKQgqOeUCa37XLExs+AMmG0hWxeyYkRLHMW\r
+       Xh+7BZR7mOMyW7pRHJ04b8J5CPwjCz/XTP7pIjyOY1R8UloBfHY3wMJ9evEPj6w4YBdH\r
+       tlTmATL1pHX3mg+lMVR/nVnrM1bSog4l8v+lHsay57bBrTemAADyRjXyeZzFaOwoOMkB\r
+       +6ug==\r
+X-Received: by 10.15.94.11 with SMTP id ba11mr13308851eeb.101.1373047901633;\r
+       Fri, 05 Jul 2013 11:11:41 -0700 (PDT)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+       by mx.google.com with ESMTPSA id\r
+       cg12sm15955158eeb.7.2013.07.05.11.11.40 for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Fri, 05 Jul 2013 11:11:41 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 06/11] contrib: pick: add button press helper\r
+Date: Fri,  5 Jul 2013 19:11:13 +0100\r
+Message-Id: <1373047878-20822-7-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1373047878-20822-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1373047878-20822-1-git-send-email-markwalters1009@gmail.com>\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, 05 Jul 2013 18:12:13 -0000\r
+\r
+We will want to be able to activate buttons not in the current\r
+buffer (ie in the message pane) so it is helpful to have a way of\r
+activating a button without signalling error if there is no button.\r
+---\r
+ contrib/notmuch-pick/notmuch-pick.el |    8 ++++++++\r
+ 1 files changed, 8 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
+index 8251b35..775b783 100644\r
+--- a/contrib/notmuch-pick/notmuch-pick.el\r
++++ b/contrib/notmuch-pick/notmuch-pick.el\r
+@@ -200,6 +200,14 @@ open (if the message pane is closed it does nothing)."\r
+        (with-selected-window notmuch-pick-message-window\r
+        (funcall #',func)))))\r
\r
++(defun notmuch-pick-button-activate (&optional button)\r
++  "Activate BUTTON or button at point\r
++\r
++This function does not give an error if there is no button."\r
++  (interactive)\r
++  (let ((button (or button (button-at (point)))))\r
++    (when button (button-activate button))))\r
++\r
+ (defvar notmuch-pick-mode-map\r
+   (let ((map (make-sparse-keymap)))\r
+     (define-key map [mouse-1] 'notmuch-pick-show-message)\r
+-- \r
+1.7.9.1\r
+\r