bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command


From: Gregory Heytings
Subject: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
Date: Tue, 04 May 2021 13:04:58 +0000


My reasoning is simple: switching windows by a keyboard command or by clicking the mouse is an intentional user action, for which he/she is fully responsible. By contrast, moving the mouse pointer can be accidental, so disabling only it in these situations makes much more sense than disabling window-switch entirely.

My patch does not disable window-switching entirely, an explicit mouse click works: ESC mouse-1 is undefined, but the window in which the click happens is selected.

The problem is that you suggest to change handle-select-window which is a general interactive function that has a "key" binding. I'd like to restrict the effect of the change only to auto-selection of windows by the mouse, because I see no reason to make the effect more broad.


Okay. The problem is that mouse-autoselect-window-select is not called with mouse-autoselect-window t, the autoselection is immediate. So handle-select-window is called immediately, and AFAICS there is at that point no way to detect whether the select-window event came from an autoselection or from an explicit selection. What I would do to narrow the possible effect is to replace the

(window-minibuffer-p)

in my patch with

(and mouse-autoselect-window (window-minibuffer-p))

Would you agree with that?

After pressing ESC, keyboard commands do not do run what one would expect, e.g. C-x o does not run other-window but (in an Elisp buffer) eval-defun (i.e. C-M-x) followed by self-insert-command ('o').

Sorry, I don't think I understand what you are trying to say here, nor how it is relevant to the issue at hand. Please clarify.


I replied to your "switching windows by a keyboard command [...] is an intentional user action", to mention that in this particular case (after pressing ESC) the keyboard commands to switch windows do not behave as expected (unlike clicking). Indeed this was not directly relevant to the issue at hand.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]