GNU bug report logs - #11304
mouse-autoselect-window causes loss of messages from echo area

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11304 in the body.
You can then email your comments to 11304 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11304; Package emacs. (Sat, 21 Apr 2012 17:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kelly Dean <kellydeanch <at> yahoo.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 21 Apr 2012 17:50:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kelly Dean <kellydeanch <at> yahoo.com>
To: bug-gnu-emacs <at> gnu.org
Subject: mouse-autoselect-window causes loss of messages from echo area
Date: Sat, 21 Apr 2012 02:53:25 -0700 (PDT)
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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11304; Package emacs. (Sun, 22 Apr 2012 12:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 11304 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Kelly Dean <kellydeanch <at> yahoo.com>
Cc: 11304 <at> debbugs.gnu.org
Subject: Re: bug#11304: mouse-autoselect-window causes loss of messages from
	echo	area
Date: Sun, 22 Apr 2012 14:29:51 +0200
[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);



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11304; Package emacs. (Tue, 24 Apr 2012 01:42:01 GMT) Full text and rfc822 format available.

Message #11 received at 11304 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Kelly Dean <kellydeanch <at> yahoo.com>, 11304 <at> debbugs.gnu.org
Subject: Re: bug#11304: mouse-autoselect-window causes loss of messages from
	echo	area
Date: Mon, 23 Apr 2012 21:41:06 -0400
> --- 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




Reply sent to martin rudalics <rudalics <at> gmx.at>:
You have taken responsibility. (Tue, 24 Apr 2012 09:20:02 GMT) Full text and rfc822 format available.

Notification sent to Kelly Dean <kellydeanch <at> yahoo.com>:
bug acknowledged by developer. (Tue, 24 Apr 2012 09:20:02 GMT) Full text and rfc822 format available.

Message #16 received at 11304-done <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 11304-done <at> debbugs.gnu.org
Cc: Kelly Dean <kellydeanch <at> yahoo.com>,
	Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#11304: mouse-autoselect-window causes loss of messages from
	echo	area
Date: Tue, 24 Apr 2012 11:18:08 +0200
> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 May 2012 11:24:03 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Kelly Dean <kellydeanch <at> yahoo.com> to control <at> debbugs.gnu.org. (Sat, 02 Jun 2012 21:27:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11304; Package emacs. (Sat, 02 Jun 2012 21:30:02 GMT) Full text and rfc822 format available.

Message #23 received at 11304 <at> debbugs.gnu.org (full text, mbox):

From: Kelly Dean <kellydeanch <at> yahoo.com>
To: 11304 <at> debbugs.gnu.org
Subject: mouse-autoselect-window causes loss of messages from echo area
Date: Sat, 2 Jun 2012 14:27:34 -0700 (PDT)
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")





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11304; Package emacs. (Sat, 02 Jun 2012 22:14:02 GMT) Full text and rfc822 format available.

Message #26 received at 11304 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Kelly Dean <kellydeanch <at> yahoo.com>
Cc: 11304 <at> debbugs.gnu.org
Subject: Re: bug#11304: mouse-autoselect-window causes loss of messages from
	echo area
Date: Sat, 02 Jun 2012 18:11:09 -0400
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.




bug Marked as fixed in versions 24.2. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 02 Jun 2012 22:57:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11304; Package emacs. (Sun, 03 Jun 2012 08:22:02 GMT) Full text and rfc822 format available.

Message #31 received at 11304 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Kelly Dean <kellydeanch <at> yahoo.com>, 11304 <at> debbugs.gnu.org
Subject: Re: bug#11304: mouse-autoselect-window causes loss of messages from
	echo	area
Date: Sun, 03 Jun 2012 10:19:25 +0200
> I repeat my encouragement for people to include the version number when
> they close bugs.

My bad.  Should not happen again.

martin




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 01 Jul 2012 11:24:03 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 18 Nov 2012 02:06:01 GMT) Full text and rfc822 format available.

bug Marked as fixed in versions 24.3. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 18 Nov 2012 02:06:02 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 24.2. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 18 Nov 2012 02:06:02 GMT) Full text and rfc822 format available.

Forcibly Merged 11304 12920. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 18 Nov 2012 02:07:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Dec 2012 12:24:03 GMT) Full text and rfc822 format available.

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.