GNU bug report logs -
#11304
mouse-autoselect-window causes loss of messages from echo area
Previous Next
Reported by: Kelly Dean <kellydeanch <at> yahoo.com>
Date: Sat, 21 Apr 2012 17:50:03 UTC
Severity: normal
Merged with 12920
Fixed in version 24.3
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 11304 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> 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
[delay-clear-echo-area.diff (text/plain, inline)]
=== 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);
This bug report was last modified 12 years and 184 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.