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: Eli Zaretskii
Subject: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
Date: Tue, 04 May 2021 16:17:19 +0300

> Date: Tue, 04 May 2021 13:04:58 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: rudalics@gmx.at, 47969@debbugs.gnu.org, robert@capuchin.co.uk
> 
> > 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?

Yes, this is better.  But I wonder if we can do better yet.  I see
that we already have machinery in place to delay auto-selection for
some reason or other -- can we use this feature in this case, perhaps?
See mouse-autoselect-window-state and its users.  Perhaps we can delay
the auto-selection until after the key sequence started by ESC is
processed?

> >> 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).

Ah, you mean only keys from special-event-map will have such an
effect.  Most probably, yes.





reply via email to

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