1 Return-Path: <markwalters1009@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 23CA7431FDD
\r
6 for <notmuch@notmuchmail.org>; Fri, 5 Jul 2013 11:12:13 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id EMdgM8l45xvt for <notmuch@notmuchmail.org>;
\r
18 Fri, 5 Jul 2013 11:12:05 -0700 (PDT)
\r
19 Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com
\r
20 [74.125.83.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
21 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
22 C78DF431FBC for <notmuch@notmuchmail.org>; Fri, 5 Jul 2013 11:11:42 -0700
\r
24 Received: by mail-ee0-f49.google.com with SMTP id b57so1512761eek.8
\r
25 for <notmuch@notmuchmail.org>; Fri, 05 Jul 2013 11:11:41 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=VORSS5Luaounav5EfpO/eS83tjsFoRLrfuZfFcuvSUg=;
\r
29 b=ti51JpZPgg6bVjdjJs+9n4Gs3ASQ1fmiYZlE0ojqksuIHQoXGgzUa+irgSsy4KcPDM
\r
30 OcvKFOg7BmJIcQdUsNE3nhU76vGqWbdkDhQi58nq+1QPozFVvrSxfron5FCdSggMu4jy
\r
31 bvm3qyBqyN5kixSOZcK2OmifFSfTpw7djQKQgqOeUCa37XLExs+AMmG0hWxeyYkRLHMW
\r
32 Xh+7BZR7mOMyW7pRHJ04b8J5CPwjCz/XTP7pIjyOY1R8UloBfHY3wMJ9evEPj6w4YBdH
\r
33 tlTmATL1pHX3mg+lMVR/nVnrM1bSog4l8v+lHsay57bBrTemAADyRjXyeZzFaOwoOMkB
\r
35 X-Received: by 10.15.94.11 with SMTP id ba11mr13308851eeb.101.1373047901633;
\r
36 Fri, 05 Jul 2013 11:11:41 -0700 (PDT)
\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])
\r
38 by mx.google.com with ESMTPSA id
\r
39 cg12sm15955158eeb.7.2013.07.05.11.11.40 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Fri, 05 Jul 2013 11:11:41 -0700 (PDT)
\r
42 From: Mark Walters <markwalters1009@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH 06/11] contrib: pick: add button press helper
\r
45 Date: Fri, 5 Jul 2013 19:11:13 +0100
\r
46 Message-Id: <1373047878-20822-7-git-send-email-markwalters1009@gmail.com>
\r
47 X-Mailer: git-send-email 1.7.9.1
\r
48 In-Reply-To: <1373047878-20822-1-git-send-email-markwalters1009@gmail.com>
\r
49 References: <1373047878-20822-1-git-send-email-markwalters1009@gmail.com>
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Fri, 05 Jul 2013 18:12:13 -0000
\r
64 We will want to be able to activate buttons not in the current
\r
65 buffer (ie in the message pane) so it is helpful to have a way of
\r
66 activating a button without signalling error if there is no button.
\r
68 contrib/notmuch-pick/notmuch-pick.el | 8 ++++++++
\r
69 1 files changed, 8 insertions(+), 0 deletions(-)
\r
71 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el
\r
72 index 8251b35..775b783 100644
\r
73 --- a/contrib/notmuch-pick/notmuch-pick.el
\r
74 +++ b/contrib/notmuch-pick/notmuch-pick.el
\r
75 @@ -200,6 +200,14 @@ open (if the message pane is closed it does nothing)."
\r
76 (with-selected-window notmuch-pick-message-window
\r
77 (funcall #',func)))))
\r
79 +(defun notmuch-pick-button-activate (&optional button)
\r
80 + "Activate BUTTON or button at point
\r
82 +This function does not give an error if there is no button."
\r
84 + (let ((button (or button (button-at (point)))))
\r
85 + (when button (button-activate button))))
\r
87 (defvar notmuch-pick-mode-map
\r
88 (let ((map (make-sparse-keymap)))
\r
89 (define-key map [mouse-1] 'notmuch-pick-show-message)
\r