From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Marshall Newsgroups: gmane.emacs.bugs Subject: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command Date: Sun, 2 May 2021 09:01:56 +0100 Message-ID: <24718.23668.709410.692688@capuchin.co.uk> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36386"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gregory Heytings , 47969@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 02 10:03:12 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 1ld74H-0009Ng-G6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 10:03:09 +0200 Original-Received: from localhost ([::1]:40826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ld74G-0000wH-Jd for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 04:03:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ld749-0000vP-U9 for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 04:03:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58023) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ld749-0002tS-N4 for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 04:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ld749-0005rF-Ki for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 04:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Marshall Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 May 2021 08:03: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.161994252521004 (code B ref 47969); Sun, 02 May 2021 08:03:01 +0000 Original-Received: (at 47969) by debbugs.gnu.org; 2 May 2021 08:02:05 +0000 Original-Received: from localhost ([127.0.0.1]:41333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ld73F-0005SV-GK for submit@debbugs.gnu.org; Sun, 02 May 2021 04:02:05 -0400 Original-Received: from know-smtprelay-omc-5.server.virginmedia.net ([80.0.253.69]:45452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ld73E-0005MX-5G for 47969@debbugs.gnu.org; Sun, 02 May 2021 04:02:04 -0400 Original-Received: from capuchin.co.uk ([82.0.180.44]) by cmsmtp with ESMTP id d737lfl2S52czd737l0PtU; Sun, 02 May 2021 09:01:57 +0100 X-Originating-IP: [82.0.180.44] X-Spam: 0 X-Authority: v=2.3 cv=WpQFz+Xv c=1 sm=1 tr=0 cx=a_exe a=ZmEqW+an5eg7eqPGYFwV/Q==:117 a=ZmEqW+an5eg7eqPGYFwV/Q==:17 a=kj9zAlcOel0A:10 a=5FLXtPjwQuUA:10 a=1uF90i_xTXIG3KFbG9MA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=CjuIK1q_8ugA:10 Original-Received: from poulenc.faure (unknown [192.168.0.153]) by capuchin.co.uk (Postfix) with ESMTPS id 2A8F619F3C0; Sun, 2 May 2021 09:01:57 +0100 (BST) In-Reply-To: X-Mailer: VM 8.2.0b under 28.0.50 (x86_64-pc-linux-gnu) X-CMAE-Envelope: MS4wfPmHk0J7Tybzs3OQ+s6jA+RlPEfjyZ+kIj8ukTWrGBpx5rEnnvOY7XRPn9GJ6qd4qdTefloChx3SsQ6MejSiFRyfroPzs/wydE0pXmfWoaP9TeJtcAx5 gPRGz3buHy517uT5K+tDOCMEEzha9Wcp6OSkKoOqXWnYf8G620RRN0UYl7wDfyn8rxKziFmLmCgwqW+MGwh9eotDtrwKf40dBXKo1yj0MkhgTTO+63n7a8ER 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:205396 Archived-At: martin rudalics writes: > > Patch attached. Could you please test it, and confirm that it correctly fixes the issue? > > > > Cc'ing Martin, who authored most of the handle-select-window function. The recipe is upthread. > > I don't know what to say because (1) moving the mouse to the lower > window does _not_ lead to typing "gnus" in that window here and (2) I'd > rather consider it a bug to _not_ select the lower window in that case. Though when I've seen this bug I am not *consciously* moving the mouse, maybe it is being accidentally jolted? Typically I was seeing this after moving from another workspace into one containing 2 emacs frames and immediately trying to run gnus. > > Mouse window auto-selection should mimic the behavior of clicking into > the lower window and clicking in that window should select it also while > a minibuffer dialogue goes on. Recall that such dialogues are not modal > as has been constated a number of times on this list. > > Note also that normally I have my minibuffer in a child frame and even > there no auto-selection takes place when the minibuffer is active > despite of the fact that I have set both WM focus-follows-mouse and > `mouse-autoselect-window'. > > But I have no strong opinion so I leave it to Robert to propose what > should be done here. > It's a difficult call between 2 conflicting requirements. I note Eli's comments but I've applied the patch and it fixes the issue for me. There can be undesirable behaviour in the current behaviour. Take this contrived example - Create file bugProvoke.el in **empty** directory containing ;;;-------- (setq mouse-autoselect-window t) (defun dxyes (interactive) (beep)) ;;; end of bugProvoke.el In that directory, emacs -Q -l bugProvoke.el C-x d ;; dired the directory C-x 2 ESC and move mouse into lower window x dxyes ;; you think you're running the dxyes function?! ;;; but look at the minibuffer before you type return and delete your file don't do this in a directory which has files you value! Robert