Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 95 / e838d365ec94003ed1d6b1f04d0274d33b59a9
1 Return-Path: <m.walters@qmul.ac.uk>\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 75282431FAF\r
6         for <notmuch@notmuchmail.org>; Sun,  6 Jan 2013 08:10:06 -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: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id u4G33Lk5u7Ha for <notmuch@notmuchmail.org>;\r
17         Sun,  6 Jan 2013 08:10:05 -0800 (PST)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 8444B431FAE\r
22         for <notmuch@notmuchmail.org>; Sun,  6 Jan 2013 08:10:05 -0800 (PST)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1TrsnO-0006qJ-Nc; Sun, 06 Jan 2013 16:10:01 +0000\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
28         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
29         (envelope-from <m.walters@qmul.ac.uk>)\r
30         id 1TrsnO-0006Mf-Ci; Sun, 06 Jan 2013 16:09:58 +0000\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: Tomi Ollila <tomi.ollila@iki.fi>, David Bremner <david@tethera.net>,\r
33         notmuch@notmuchmail.org\r
34 Subject: Re: [PATCH] emacs: show: make id links respect window\r
35 In-Reply-To: <m2txqufgpk.fsf@guru.guru-group.fi>\r
36 References: <1355958602-16752-1-git-send-email-markwalters1009@gmail.com>\r
37         <87bodjfnt0.fsf@zancas.localnet> <87mwx2jsu0.fsf@qmul.ac.uk>\r
38         <87bodgrh6a.fsf@zancas.localnet>\r
39         <m2zk0ni9jg.fsf@guru.guru-group.fi> <87k3rqz594.fsf@qmul.ac.uk>\r
40         <m2txqufgpk.fsf@guru.guru-group.fi>\r
41 User-Agent: Notmuch/0.14+236~g1d0044f (http://notmuchmail.org) Emacs/23.4.1\r
42         (x86_64-pc-linux-gnu)\r
43 Date: Sun, 06 Jan 2013 16:10:01 +0000\r
44 Message-ID: <87hamuz412.fsf@qmul.ac.uk>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain; charset=us-ascii\r
47 X-Sender-Host-Address: 93.97.24.31\r
48 X-QM-SPAM-Info: Sender has good ham record.  :)\r
49 X-QM-Body-MD5: 5cedcd1bdbcb0af0c8303c5a9bf2d650 (of first 20000 bytes)\r
50 X-SpamAssassin-Score: -1.8\r
51 X-SpamAssassin-SpamBar: -\r
52 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
53         determine if it is\r
54         spam. We require at least 5.0 points to mark a message as spam.\r
55         This message scored -1.8 points.\r
56         Summary of the scoring: \r
57         * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
58         *      medium trust\r
59         *      [138.37.6.40 listed in list.dnswl.org]\r
60         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
61         provider *      (markwalters1009[at]gmail.com)\r
62         *  0.5 AWL AWL: From: address is in the auto white-list\r
63 X-QM-Scan-Virus: ClamAV says the message is clean\r
64 X-BeenThere: notmuch@notmuchmail.org\r
65 X-Mailman-Version: 2.1.13\r
66 Precedence: list\r
67 List-Id: "Use and development of the notmuch mail system."\r
68         <notmuch.notmuchmail.org>\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
72 List-Post: <mailto:notmuch@notmuchmail.org>\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
75         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
76 X-List-Received-Date: Sun, 06 Jan 2013 16:10:06 -0000\r
77 \r
78 \r
79 On Sun, 06 Jan 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
80 > On Sun, Jan 06 2013, Mark Walters <markwalters1009@gmail.com> wrote:\r
81 >\r
82 >> On Sat, 05 Jan 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
83 >>> On Wed, Dec 26 2012, David Bremner <david@tethera.net> wrote:\r
84 >>>\r
85 >>>> Mark Walters <markwalters1009@gmail.com> writes:\r
86 >>>>\r
87 >>>>>> I can imagine that people would want/like the "open in other window" \r
88 >>>>>> effect of the current code, even if the reason is a bug.\r
89 >>>>>\r
90 >>>>> That's definitely possible. I generally expect a mouse click to select\r
91 >>>>> the window I click and this feels counter intuitive. I think that some\r
92 >>>>> people might like an option "open this link in a new window" but I would\r
93 >>>>> guess that would like that whether they clicked or pressed RET on the\r
94 >>>>> button.\r
95 >>>>\r
96 >>>> I don't care much either way myself, but before we change notmuch-show\r
97 >>>> behaviour (effectively) to accomodate notmuch-pick, I'd like a bit more\r
98 >>>> feedback from other people.\r
99 >>>\r
100 >>> I tested the old behaviour -- split frame to 2 windows, one containing\r
101 >>> *scratch* and one *notmuch-hello*. Then I searched for 'obsoletes',\r
102 >>> chose last message (id:1356936162-2589-1-git-send-email-amdragon@mit.edu)\r
103 >>> moved point to *scratch* buffer and clicked the id: link -- and indeed,\r
104 >>> the *scratch* window was replaced.\r
105 >>>\r
106 >>> I didn't look or test Mark's patch as he stated:\r
107 >>> "The lisp is not pretty but seems to work." ;)\r
108 >>> ... well, not entirely because of that but I trust it opens the message\r
109 >>> in window where the clicked link were and keeps point where it used to\r
110 >>> be before clicking (in case point was in different window).\r
111 >>\r
112 >> It doesn't quite do this: point moves to the window that was clicked. It\r
113 >> is just as easy to do as Tomi says (patch below but I should resend if\r
114 >> people like it so the commit message gets picked up).\r
115 >\r
116 > It seems to be the default (and iniuitively expected) behaviour that\r
117 > point moves to the window that was clicked... so that's ok :)\r
118 >\r
119 >> Incidentally, I would be interested to know what people expect the\r
120 >> following to do: go to notmuch hello and then search. Now display the\r
121 >> results in two windows simultaneously (either split the frame into two\r
122 >> windows (c-x 2) or use 2 frames (C-x 5 2)) and then press q.\r
123 >>\r
124 >> What actually happens is that q runs kill buffer so it disappears in\r
125 >> both windows: one of which will fall back to notmuch-hello and one of\r
126 >> which will fall back to some other window (eg scratch)\r
127 >\r
128 > I think that is just expected behaviour, there are e.g.. c-x b and c-x 0\r
129 > which should be familiar to every emacs users...\r
130 \r
131 My instinct would be that the window I press q in should go to the\r
132 previous buffer in that window but the other window should stay where it\r
133 was. But if others are happy as it that is obviously fine.\r
134 \r
135 \r
136 >> Best wishes\r
137 >>\r
138 >> Mark\r
139 >\r
140 > Tomi\r
141 >\r
142 > PS: did you change anything in the patch below ?\r
143 \r
144 Yes: the new version uses (with-selected-window window ...) compared\r
145 with (select-window window) (...)\r
146 \r
147 So the old version switches point to the clicked window, the new version\r
148 does not. I am happy either way: the click does normally move point, but\r
149 other buttons such as invisibility buttons do not move point when\r
150 mouse-clicked so....\r
151 \r
152 Best wishes\r
153 \r
154 \r
155 Mark\r
156 \r
157 \r
158 >>\r
159 >>  emacs/notmuch-show.el |    5 +++++\r
160 >>  1 files changed, 5 insertions(+), 0 deletions(-)\r
161 >>\r
162 >> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
163 >> index 5751d98..00b9b56 100644\r
164 >> --- a/emacs/notmuch-show.el\r
165 >> +++ b/emacs/notmuch-show.el\r
166 >> @@ -1077,6 +1077,11 @@ buttons for a corresponding notmuch search."\r
167 >>      (make-text-button (first link) (second link)\r
168 >>                        'action `(lambda (arg)\r
169 >>                                   (notmuch-show ,(third link)))\r
170 >> +                      'mouse-action `(lambda (arg)\r
171 >> +                                       (let* ((event last-input-event)\r
172 >> +                                              (window (car (cadr event))))\r
173 >> +                                         (with-selected-window window\r
174 >> +                                           (notmuch-show ,(third link)))))\r
175 >>                        'follow-link t\r
176 >>                        'help-echo "Mouse-1, RET: search for this message"\r
177 >>                        'face goto-address-mail-face)))))\r
178 >> -- \r
179 >> 1.7.9.1\r
180 >>\r
181 >> _______________________________________________\r
182 >> notmuch mailing list\r
183 >> notmuch@notmuchmail.org\r
184 >> http://notmuchmail.org/mailman/listinfo/notmuch\r