[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / a0 / 8b97860987de4bf33e3462c86e124c75b48b39
1 Return-Path: <amdragon@mit.edu>\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 738DC431FAF\r
6         for <notmuch@notmuchmail.org>; Mon,  7 Jan 2013 12:22:27 -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: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id vmUDB5Uyh-qp for <notmuch@notmuchmail.org>;\r
16         Mon,  7 Jan 2013 12:22:26 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU\r
18         [18.9.25.13])\r
19         by olra.theworths.org (Postfix) with ESMTP id AA597431FAE\r
20         for <notmuch@notmuchmail.org>; Mon,  7 Jan 2013 12:22:26 -0800 (PST)\r
21 X-AuditID: 1209190d-b7efd6d000001a82-c1-50eb2e802e12\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
23         by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id E8.F8.06786.08E2BE05; Mon,  7 Jan 2013 15:22:24 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id r07KMNN8021436; \r
27         Mon, 7 Jan 2013 15:22:24 -0500\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id r07KMLKV020117\r
32         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
33         Mon, 7 Jan 2013 15:22:23 -0500 (EST)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1TsJDB-0000hY-N1; Mon, 07 Jan 2013 15:22:21 -0500\r
37 Date: Mon, 7 Jan 2013 15:22:21 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Mark Walters <markwalters1009@gmail.com>\r
40 Subject: Re: [PATCH] emacs: show: make buttons select window\r
41 Message-ID: <20130107202221.GL17581@mit.edu>\r
42 References: <1357583091-28738-1-git-send-email-markwalters1009@gmail.com>\r
43 MIME-Version: 1.0\r
44 Content-Type: text/plain; charset=us-ascii\r
45 Content-Disposition: inline\r
46 In-Reply-To: <1357583091-28738-1-git-send-email-markwalters1009@gmail.com>\r
47 User-Agent: Mutt/1.5.21 (2010-09-15)\r
48 X-Brightmail-Tracker:\r
49  H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IR4hRV1m3Qex1gsHeTtMXquTwW12/OZHZg\r
50         8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4Mjb+mMhasEG9YvUphQbGh/JdjJwcEgImEo13\r
51         3jBD2GISF+6tZ+ti5OIQEtjHKLHvwmQWCGc9o8TZE3PZQKqEBC4wSax4zQqRWMIoMf3zcrB2\r
52         FgEVib6zsxhBbDYBDYlt+5eD2SICOhK3Dy1gB7GZBaQlvv1uZgKxhQVsJL6v/wBm8wLVTLi1\r
53         iB1igafElMPPoOKCEidnPmGB6NWSuPHvJVCcA2zO8n8cIGFOAS+J9V/Pga0SBTphysltbBMY\r
54         hWYh6Z6FpHsWQvcCRuZVjLIpuVW6uYmZOcWpybrFyYl5ealFukZ6uZkleqkppZsYwSEtybuD\r
55         8d1BpUOMAhyMSjy8L11fBQixJpYVV+YeYpTkYFIS5X0s9zpAiC8pP6UyI7E4I76oNCe1+BCj\r
56         BAezkgjvtwdA5bwpiZVVqUX5MClpDhYlcd4rKTf9hQTSE0tSs1NTC1KLYLIyHBxKErzlukBD\r
57         BYtS01Mr0jJzShDSTBycIMN5gIbng9TwFhck5hZnpkPkTzEqSonzxoEkBEASGaV5cL2wlPOK\r
58         URzoFWHeWpAqHmC6gut+BTSYCWhw6uPnIINLEhFSUg2MDk/r9EW9T07cGbj5jJLvQ/EgzaRH\r
59         L2csUpn3VuHLi8qPx46yTzmyeKX3EieDvS9dn8x6v8+bk6FY9UrA+lL+ubdPcCxk/Hrsjo7f\r
60         sdvLQ1ujMjecfq5h+urzL4ktgd8kcw/+Pb3Bt7RZ7GKugNOX82bqfVu+O+ustW7yeT5RxGel\r
61         Or/8cgnvz0osxRmJhlrMRcWJAEr93ggUAwAA\r
62 Cc: notmuch@notmuchmail.org\r
63 X-BeenThere: notmuch@notmuchmail.org\r
64 X-Mailman-Version: 2.1.13\r
65 Precedence: list\r
66 List-Id: "Use and development of the notmuch mail system."\r
67         <notmuch.notmuchmail.org>\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
71 List-Post: <mailto:notmuch@notmuchmail.org>\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
74         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
75 X-List-Received-Date: Mon, 07 Jan 2013 20:22:27 -0000\r
76 \r
77 Quoth Mark Walters on Jan 07 at  6:24 pm:\r
78 > Emacs has two button type objects: widgets (as used for saved searches\r
79 > in notmuch-hello) and buttons as used by parts/citations and id links\r
80 > in notmuch-show. These two behave subtly differently when clicked with\r
81 > the mouse: widgets select the window clicked before running the\r
82 > action, buttons do not.\r
83\r
84 > This patch makes all of these behave the same: clicking always selects\r
85 > the clicked window. It does this by defining a notmuch-button-type\r
86 > supertype that the other notmuch buttons can inherit from. This\r
87 > supertype binds the mouse-action to select the window and then\r
88 > activate the button.\r
89 > ---\r
90\r
91 > This is a new patch attempting to do the same as\r
92 > id:1355958602-16752-1-git-send-email-markwalters1009@gmail.com\r
93\r
94 > This version changes all notmuch buttons to select the appropriate\r
95 > window before applying the action. This brings the buttons in line\r
96 > with widgets (as used in notmuch hello) and whatever is used for\r
97 > http:// links.\r
98\r
99 > I think that buttons should at least run the action in the clicked\r
100 > window: whether point should remain there is less clear. This version\r
101 > does leave point there as this is what widgets and links do (but this\r
102 > would be easy to change).\r
103\r
104 > I don't know whether we want to do this for 0.15: the change for id\r
105 > links would be nice, the other cases are less important. If preferred\r
106 > I can provide a patch fixing that single instance.\r
107\r
108 > Finally, if anyone who uses the crypto stuff could check that it works\r
109 > for crypto buttons that would be nice as I do not have crypto setup.\r
110\r
111 > Best wishes\r
112\r
113 > Mark\r
114\r
115\r
116\r
117\r
118 >  emacs/notmuch-crypto.el |    3 ++-\r
119 >  emacs/notmuch-lib.el    |    5 +++++\r
120 >  emacs/notmuch-show.el   |    4 +++-\r
121 >  emacs/notmuch-wash.el   |    3 ++-\r
122 >  4 files changed, 12 insertions(+), 3 deletions(-)\r
123\r
124 > diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el\r
125 > index 83e5d37..173a3e7 100644\r
126 > --- a/emacs/notmuch-crypto.el\r
127 > +++ b/emacs/notmuch-crypto.el\r
128 > @@ -76,7 +76,8 @@ mode."\r
129 >  (define-button-type 'notmuch-crypto-status-button-type\r
130 >    'action (lambda (button) (message (button-get button 'help-echo)))\r
131 >    'follow-link t\r
132 > -  'help-echo "Set notmuch-crypto-process-mime to process cryptographic mime parts.")\r
133 > +  'help-echo "Set notmuch-crypto-process-mime to process cryptographic mime parts."\r
134 > +  :supertype 'notmuch-button-type)\r
135 \r
136 This should be 'supertype for consistency.\r
137 \r
138 Also, notmuch-crypto.el should have a (require 'notmuch-lib) at the\r
139 top now.\r
140 \r
141 >  \r
142 >  (defun notmuch-crypto-insert-sigstatus-button (sigstatus from)\r
143 >    (let* ((status (plist-get sigstatus :status))\r
144 > diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
145 > index 0407f8a..1573e32 100644\r
146 > --- a/emacs/notmuch-lib.el\r
147 > +++ b/emacs/notmuch-lib.el\r
148 > @@ -97,6 +97,11 @@ For example, if you wanted to remove an \"inbox\" tag and add an\r
149 >    :group 'notmuch-search\r
150 >    :group 'notmuch-show)\r
151 >  \r
152 > +(define-button-type 'notmuch-button-type\r
153 > +  'mouse-action (lambda (button)\r
154 > +               (select-window (posn-window (event-start last-input-event)))\r
155 > +               (button-activate button)))\r
156 > +\r
157 \r
158 I think this deserves a comment explaining how buttons behave by\r
159 default and the problems this causes both for code (funny results of\r
160 buffer changes and point placement) and user experience (not moving\r
161 point to the clicked window).\r
162 \r
163 >  (defun notmuch-version ()\r
164 >    "Return a string with the notmuch version number."\r
165 >    (let ((long-string\r
166 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
167 > index 5751d98..059194d 100644\r
168 > --- a/emacs/notmuch-show.el\r
169 > +++ b/emacs/notmuch-show.el\r
170 > @@ -469,7 +469,8 @@ message at DEPTH in the current thread."\r
171 >    'action 'notmuch-show-part-button-default\r
172 >    'keymap 'notmuch-show-part-button-map\r
173 >    'follow-link t\r
174 > -  'face 'message-mml)\r
175 > +  'face 'message-mml\r
176 > +  :supertype 'notmuch-button-type)\r
177 \r
178 'supertype\r
179 \r
180 >  \r
181 >  (defvar notmuch-show-part-button-map\r
182 >    (let ((map (make-sparse-keymap)))\r
183 > @@ -1075,6 +1076,7 @@ buttons for a corresponding notmuch search."\r
184 >       ;; Remove the overlay created by goto-address-mode\r
185 >       (remove-overlays (first link) (second link) 'goto-address t)\r
186 >       (make-text-button (first link) (second link)\r
187 > +                       :type 'notmuch-button-type\r
188 \r
189 'type\r
190 \r
191 >                         'action `(lambda (arg)\r
192 >                                    (notmuch-show ,(third link)))\r
193 >                         'follow-link t\r
194 > diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el\r
195 > index d6db4fa..826b6f4 100644\r
196 > --- a/emacs/notmuch-wash.el\r
197 > +++ b/emacs/notmuch-wash.el\r
198 > @@ -115,7 +115,8 @@ lower).")\r
199 >  (define-button-type 'notmuch-wash-button-invisibility-toggle-type\r
200 >    'action 'notmuch-wash-toggle-invisible-action\r
201 >    'follow-link t\r
202 > -  'face 'font-lock-comment-face)\r
203 > +  'face 'font-lock-comment-face\r
204 > +  :supertype 'notmuch-button-type)\r
205 \r
206 'supertype\r
207 \r
208 >  \r
209 >  (define-button-type 'notmuch-wash-button-citation-toggle-type\r
210 >    'help-echo "mouse-1, RET: Show citation"\r