From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command Date: Tue, 04 May 2021 13:04:58 +0000 Message-ID: <1a73bd6c69e27aed1fbd@heytings.org> References: <24706.50397.801563.461736@capuchin.co.uk> <7ee648e84004b7745946@heytings.org> <24709.3891.605753.919647@capuchin.co.uk> <677a04021b23aa2d7c9f@heytings.org> <24709.24669.871737.299611@capuchin.co.uk> <677a04021b6d6347bbd2@heytings.org> <4edb1435266ad41487a5@heytings.org> <8fdeca1f-7d34-c95a-0f2d-5550dea34512@gmx.at> <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@gmx.at> <838s4w6mua.fsf@gnu.org> <83y2cv6773.fsf@gnu.org> <1a73bd6c69efd6282e57@heytings.org> <83bl9q676g.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40849"; mail-complaints-to="usenet@ciao.gmane.io" Cc: robert@capuchin.co.uk, 47969@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 04 15:07:04 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldulS-000ATr-R0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 15:07:03 +0200 Original-Received: from localhost ([::1]:49640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldulR-00076x-Tg for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 09:07:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldukW-0006Mo-Lu for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 09:06:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldukT-0004Li-SS for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 09:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ldukT-0007ZB-No for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 09:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 May 2021 13:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47969 X-GNU-PR-Package: emacs Original-Received: via spool by 47969-submit@debbugs.gnu.org id=B47969.162013350229067 (code B ref 47969); Tue, 04 May 2021 13:06:01 +0000 Original-Received: (at 47969) by debbugs.gnu.org; 4 May 2021 13:05:02 +0000 Original-Received: from localhost ([127.0.0.1]:53100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldujV-0007Yc-Ig for submit@debbugs.gnu.org; Tue, 04 May 2021 09:05:01 -0400 Original-Received: from heytings.org ([95.142.160.155]:37152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldujT-0007YL-Rg for 47969@debbugs.gnu.org; Tue, 04 May 2021 09:05:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1620133498; bh=6lBf4bL5obt9PmQI643QjerYTGDrlTIvwTxFL4bZL1c=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=umYn6FVE4oD4kNZU/RUoUditweQt5xoXJUmvJHyE8yUpqtsqzqkJx33uGauAd2bJb ptAIBJ9j7WiZfXdUZ9T7cyYVljiWzrfFQRuCMdX13slZufgOb2OFlPqdmGrsdhilVA b4FChTvd3pmlfD562snx4kZugtbx8XqH5scU2DK4lHgFwi6/h3CCiyhQGH/EKGPBBp FgUpBqWLnJ3ndsVQhcViX6fqxCXbYJu8FfgzXQt9//6PUqV/FvcFj7+RTPhpXVyrE2 KpgaQy1Cvm2yaEKAgRbotln5Ks/eA4bN+VdqQ8RStf+0VsVTFNhRDC7K95GMzVg8vm LC1DpLlzdWXYA== In-Reply-To: <83bl9q676g.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205605 Archived-At: >>> 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.