* bug#11304: mouse-autoselect-window causes loss of messages from echo area
@ 2012-04-21 9:53 Kelly Dean
2012-04-22 12:29 ` martin rudalics
2012-06-02 21:27 ` Kelly Dean
0 siblings, 2 replies; 7+ messages in thread
From: Kelly Dean @ 2012-04-21 9:53 UTC (permalink / raw)
To: 11304
I'm using Emacs on X on Debian 6 Stable. emacs-version says GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-11 on raven, modified by Debian.
Steps to reproduce the bug (or maybe it's an intentional feature, but if so, I don't see the purpose):
Put just the following in your .emacs file:
(setq mouse-autoselect-window t)
Start Emacs with no options.
Press C-g.
Move your mouse pointer across the echo area. Emacs erases "Quit". The desired behavior is to not erase the text; I routinely inadvertently move the pointer across the echo area when moving the pointer to another window (of the window manager, not of Emacs), and when I go back to Emacs, I then have to switch to *Messages* to see what the last message was, rather than just looking at the echo area. Disabling mouse-autoselect-window to avoid the bug isn't an option; the feature is too useful.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11304: mouse-autoselect-window causes loss of messages from echo area
2012-04-21 9:53 bug#11304: mouse-autoselect-window causes loss of messages from echo area Kelly Dean
@ 2012-04-22 12:29 ` martin rudalics
2012-04-24 1:41 ` Stefan Monnier
2012-06-02 21:27 ` Kelly Dean
1 sibling, 1 reply; 7+ messages in thread
From: martin rudalics @ 2012-04-22 12:29 UTC (permalink / raw)
To: Kelly Dean; +Cc: 11304
[-- Attachment #1: Type: text/plain, Size: 994 bytes --]
> Steps to reproduce the bug (or maybe it's an intentional feature, but if so, I don't see the purpose):
> Put just the following in your .emacs file:
> (setq mouse-autoselect-window t)
> Start Emacs with no options.
> Press C-g.
> Move your mouse pointer across the echo area. Emacs erases "Quit". The desired behavior is to not erase the text; I routinely inadvertently move the pointer across the echo area when moving the pointer to another window (of the window manager, not of Emacs), and when I go back to Emacs, I then have to switch to *Messages* to see what the last message was, rather than just looking at the echo area. Disabling mouse-autoselect-window to avoid the bug isn't an option; the feature is too useful.
We can fix this via the attached patch. It changes behavior in the
sense that it doesn't run `echo-area-clear-hook' any more for
select-window events. But if this hook is important it should probably
be run by (message nil) and (message "") anyway.
martin
[-- Attachment #2: delay-clear-echo-area.diff --]
[-- Type: text/plain, Size: 1027 bytes --]
=== modified file 'lisp/window.el'
--- lisp/window.el 2012-04-20 08:48:50 +0000
+++ lisp/window.el 2012-04-22 12:11:50 +0000
@@ -5727,6 +5727,8 @@
(setq mouse-autoselect-window-state nil)
;; Run `mouse-leave-buffer-hook' when autoselecting window.
(run-hooks 'mouse-leave-buffer-hook))
+ ;; Clear echo area.
+ (message nil)
(select-window window))))
(defun truncated-partial-width-window-p (&optional window)
=== modified file 'src/keyboard.c'
--- src/keyboard.c 2012-04-20 21:26:18 +0000
+++ src/keyboard.c 2012-04-22 12:19:03 +0000
@@ -2984,7 +2984,10 @@
own stuff with the echo area. */
if (!CONSP (c)
|| (!(EQ (Qhelp_echo, XCAR (c)))
- && !(EQ (Qswitch_frame, XCAR (c)))))
+ && !(EQ (Qswitch_frame, XCAR (c)))
+ /* Don't wipe echo area for select window events: These might
+ get delayed via `mouse-autoselect-window' (Bug#11304). */
+ && !(EQ (Qselect_window, XCAR (c)))))
{
if (!NILP (echo_area_buffer[0]))
safe_run_hooks (Qecho_area_clear_hook);
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11304: mouse-autoselect-window causes loss of messages from echo area
2012-04-22 12:29 ` martin rudalics
@ 2012-04-24 1:41 ` Stefan Monnier
2012-04-24 9:18 ` martin rudalics
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2012-04-24 1:41 UTC (permalink / raw)
To: martin rudalics; +Cc: Kelly Dean, 11304
> --- src/keyboard.c 2012-04-20 21:26:18 +0000
> +++ src/keyboard.c 2012-04-22 12:19:03 +0000
> @@ -2984,7 +2984,10 @@
> own stuff with the echo area. */
> if (!CONSP (c)
> || (!(EQ (Qhelp_echo, XCAR (c)))
> - && !(EQ (Qswitch_frame, XCAR (c)))))
> + && !(EQ (Qswitch_frame, XCAR (c)))
> + /* Don't wipe echo area for select window events: These might
> + get delayed via `mouse-autoselect-window' (Bug#11304). */
> + && !(EQ (Qselect_window, XCAR (c)))))
> {
> if (!NILP (echo_area_buffer[0]))
> safe_run_hooks (Qecho_area_clear_hook);
This looks right, thank you,
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11304: mouse-autoselect-window causes loss of messages from echo area
2012-04-24 1:41 ` Stefan Monnier
@ 2012-04-24 9:18 ` martin rudalics
0 siblings, 0 replies; 7+ messages in thread
From: martin rudalics @ 2012-04-24 9:18 UTC (permalink / raw)
To: 11304-done; +Cc: Kelly Dean
> This looks right, thank you,
Installed in the trunk together with the change in
`handle-select-window'. If we decide that we don't want the latter, for
example, because we don't like "Clearing the minibuffer/echo-area for
global indicators", we can remove it at any time.
martin
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11304: mouse-autoselect-window causes loss of messages from echo area
2012-04-21 9:53 bug#11304: mouse-autoselect-window causes loss of messages from echo area Kelly Dean
2012-04-22 12:29 ` martin rudalics
@ 2012-06-02 21:27 ` Kelly Dean
2012-06-02 22:11 ` Glenn Morris
1 sibling, 1 reply; 7+ messages in thread
From: Kelly Dean @ 2012-06-02 21:27 UTC (permalink / raw)
To: 11304
This bug is reproducible on 24.1-rc1. (emacs-version reports "GNU Emacs 24.1.1 (i686-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2012-06-01 on localhost")
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11304: mouse-autoselect-window causes loss of messages from echo area
2012-06-02 21:27 ` Kelly Dean
@ 2012-06-02 22:11 ` Glenn Morris
2012-06-03 8:19 ` martin rudalics
0 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2012-06-02 22:11 UTC (permalink / raw)
To: Kelly Dean; +Cc: 11304
Kelly Dean wrote:
> This bug is reproducible on 24.1-rc1. (emacs-version reports "GNU Emacs 24.1.1 (i686-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2012-06-01 on localhost")
This is to be expected since it was only ever changed in the emacs
trunk, not the 24 branch.
I repeat my encouragement for people to include the version number when
they close bugs.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11304: mouse-autoselect-window causes loss of messages from echo area
2012-06-02 22:11 ` Glenn Morris
@ 2012-06-03 8:19 ` martin rudalics
0 siblings, 0 replies; 7+ messages in thread
From: martin rudalics @ 2012-06-03 8:19 UTC (permalink / raw)
To: Glenn Morris; +Cc: Kelly Dean, 11304
> I repeat my encouragement for people to include the version number when
> they close bugs.
My bad. Should not happen again.
martin
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-06-03 8:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-21 9:53 bug#11304: mouse-autoselect-window causes loss of messages from echo area Kelly Dean
2012-04-22 12:29 ` martin rudalics
2012-04-24 1:41 ` Stefan Monnier
2012-04-24 9:18 ` martin rudalics
2012-06-02 21:27 ` Kelly Dean
2012-06-02 22:11 ` Glenn Morris
2012-06-03 8:19 ` martin rudalics
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).