[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 97 / a27d919a76527f92c98a34d51d3bee606c49a5
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 51D60431FBD\r
6         for <notmuch@notmuchmail.org>; Mon,  7 Jan 2013 10:24:58 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 2.7\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.7 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         FREEMAIL_REPLY=2.499, 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 75ewR6QrtQe5 for <notmuch@notmuchmail.org>;\r
18         Mon,  7 Jan 2013 10:24:57 -0800 (PST)\r
19 Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com\r
20  [74.125.82.51])        (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  88FC9431FAE    for <notmuch@notmuchmail.org>; Mon,  7 Jan 2013 10:24:57 -0800\r
23  (PST)\r
24 Received: by mail-wg0-f51.google.com with SMTP id gg4so9759772wgb.6\r
25         for <notmuch@notmuchmail.org>; Mon, 07 Jan 2013 10:24:56 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=x-received:from:to:cc:subject:date:message-id:x-mailer;\r
28         bh=0QhrGc8tRuE6pGATW64rY1lUqwSIRFJ5U5Yng7veCPw=;\r
29         b=xpT+KMr2pX4XPnQRY66uHquDP7kauVp7CLu5n0lrBtOWhFWJPOR5sMcIXnSpnC56Jo\r
30         i2NuudrpfCZGDC3Lkfk/1mMteDCeTEW4EMBGB/V/zdBS2Y4JusNIBg0eEkMcA70q2NOJ\r
31         NmDUGkxatniXJ7DaGdmApGfJkijVn+IennYWbm6VjwqAWlb5O+D3MEKGbHAvD+Gh+vBk\r
32         KYfkFm6pS8uVF6kOOu0rj1iHNBFpIjKFA1NG7tDsEkadE1EaEMmiEyFLVo2xikUA0KIa\r
33         nGv9Kl+U1+t73xNVduniMtqYEmcvexe+bNZcTYbYukjNcxV7olSbjaKUXSCGoqzq7nLJ\r
34         8eRg==\r
35 X-Received: by 10.180.73.202 with SMTP id n10mr10768193wiv.17.1357583095041;\r
36         Mon, 07 Jan 2013 10:24:55 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPS id df2sm13248748wib.0.2013.01.07.10.24.53\r
39         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
40         Mon, 07 Jan 2013 10:24:53 -0800 (PST)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH] emacs: show: make buttons select window\r
44 Date: Mon,  7 Jan 2013 18:24:51 +0000\r
45 Message-Id: <1357583091-28738-1-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Mon, 07 Jan 2013 18:24:58 -0000\r
60 \r
61 Emacs has two button type objects: widgets (as used for saved searches\r
62 in notmuch-hello) and buttons as used by parts/citations and id links\r
63 in notmuch-show. These two behave subtly differently when clicked with\r
64 the mouse: widgets select the window clicked before running the\r
65 action, buttons do not.\r
66 \r
67 This patch makes all of these behave the same: clicking always selects\r
68 the clicked window. It does this by defining a notmuch-button-type\r
69 supertype that the other notmuch buttons can inherit from. This\r
70 supertype binds the mouse-action to select the window and then\r
71 activate the button.\r
72 ---\r
73 \r
74 This is a new patch attempting to do the same as\r
75 id:1355958602-16752-1-git-send-email-markwalters1009@gmail.com\r
76 \r
77 This version changes all notmuch buttons to select the appropriate\r
78 window before applying the action. This brings the buttons in line\r
79 with widgets (as used in notmuch hello) and whatever is used for\r
80 http:// links.\r
81 \r
82 I think that buttons should at least run the action in the clicked\r
83 window: whether point should remain there is less clear. This version\r
84 does leave point there as this is what widgets and links do (but this\r
85 would be easy to change).\r
86 \r
87 I don't know whether we want to do this for 0.15: the change for id\r
88 links would be nice, the other cases are less important. If preferred\r
89 I can provide a patch fixing that single instance.\r
90 \r
91 Finally, if anyone who uses the crypto stuff could check that it works\r
92 for crypto buttons that would be nice as I do not have crypto setup.\r
93 \r
94 Best wishes\r
95 \r
96 Mark\r
97 \r
98 \r
99 \r
100 \r
101  emacs/notmuch-crypto.el |    3 ++-\r
102  emacs/notmuch-lib.el    |    5 +++++\r
103  emacs/notmuch-show.el   |    4 +++-\r
104  emacs/notmuch-wash.el   |    3 ++-\r
105  4 files changed, 12 insertions(+), 3 deletions(-)\r
106 \r
107 diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el\r
108 index 83e5d37..173a3e7 100644\r
109 --- a/emacs/notmuch-crypto.el\r
110 +++ b/emacs/notmuch-crypto.el\r
111 @@ -76,7 +76,8 @@ mode."\r
112  (define-button-type 'notmuch-crypto-status-button-type\r
113    'action (lambda (button) (message (button-get button 'help-echo)))\r
114    'follow-link t\r
115 -  'help-echo "Set notmuch-crypto-process-mime to process cryptographic mime parts.")\r
116 +  'help-echo "Set notmuch-crypto-process-mime to process cryptographic mime parts."\r
117 +  :supertype 'notmuch-button-type)\r
118  \r
119  (defun notmuch-crypto-insert-sigstatus-button (sigstatus from)\r
120    (let* ((status (plist-get sigstatus :status))\r
121 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
122 index 0407f8a..1573e32 100644\r
123 --- a/emacs/notmuch-lib.el\r
124 +++ b/emacs/notmuch-lib.el\r
125 @@ -97,6 +97,11 @@ For example, if you wanted to remove an \"inbox\" tag and add an\r
126    :group 'notmuch-search\r
127    :group 'notmuch-show)\r
128  \r
129 +(define-button-type 'notmuch-button-type\r
130 +  'mouse-action (lambda (button)\r
131 +                 (select-window (posn-window (event-start last-input-event)))\r
132 +                 (button-activate button)))\r
133 +\r
134  (defun notmuch-version ()\r
135    "Return a string with the notmuch version number."\r
136    (let ((long-string\r
137 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
138 index 5751d98..059194d 100644\r
139 --- a/emacs/notmuch-show.el\r
140 +++ b/emacs/notmuch-show.el\r
141 @@ -469,7 +469,8 @@ message at DEPTH in the current thread."\r
142    'action 'notmuch-show-part-button-default\r
143    'keymap 'notmuch-show-part-button-map\r
144    'follow-link t\r
145 -  'face 'message-mml)\r
146 +  'face 'message-mml\r
147 +  :supertype 'notmuch-button-type)\r
148  \r
149  (defvar notmuch-show-part-button-map\r
150    (let ((map (make-sparse-keymap)))\r
151 @@ -1075,6 +1076,7 @@ buttons for a corresponding notmuch search."\r
152         ;; Remove the overlay created by goto-address-mode\r
153         (remove-overlays (first link) (second link) 'goto-address t)\r
154         (make-text-button (first link) (second link)\r
155 +                         :type 'notmuch-button-type\r
156                           'action `(lambda (arg)\r
157                                      (notmuch-show ,(third link)))\r
158                           'follow-link t\r
159 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el\r
160 index d6db4fa..826b6f4 100644\r
161 --- a/emacs/notmuch-wash.el\r
162 +++ b/emacs/notmuch-wash.el\r
163 @@ -115,7 +115,8 @@ lower).")\r
164  (define-button-type 'notmuch-wash-button-invisibility-toggle-type\r
165    'action 'notmuch-wash-toggle-invisible-action\r
166    'follow-link t\r
167 -  'face 'font-lock-comment-face)\r
168 +  'face 'font-lock-comment-face\r
169 +  :supertype 'notmuch-button-type)\r
170  \r
171  (define-button-type 'notmuch-wash-button-citation-toggle-type\r
172    'help-echo "mouse-1, RET: Show citation"\r
173 -- \r
174 1.7.9.1\r
175 \r