GNU bug report logs - #47969
28.0.50; Losing minibuffer focus in trying M-x command

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Robert Marshall <robert@HIDDEN>; dated Fri, 23 Apr 2021 13:01:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 5 May 2021 11:24:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 05 07:24:42 2021
Received: from localhost ([127.0.0.1]:59511 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1leFdx-0008Qu-R4
	for submit <at> debbugs.gnu.org; Wed, 05 May 2021 07:24:41 -0400
Received: from mout.gmx.net ([212.227.17.21]:49229)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1leFdv-0008Qo-8c
 for 47969 <at> debbugs.gnu.org; Wed, 05 May 2021 07:24:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1620213867;
 bh=Qo93hmBDaScRcr6o/Uk5h3i+WWiGK1Rbpin1x7C/f58=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=BULsogL4cnuyleHthas1zjg2UNNTKgNvu6bK0oRmcfODZwpFE+Zx8odJogLuXCWuc
 gc51BQCXSphFD2WFovAlZkGtvmwn9Lr+Hx4ZCa9EEAdAfKhsmUl8ScYN40/5XqpgVp
 YgI7/9F5qNLerpHRWeCeUam8MXQ9BxzeRpka8wsM=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([212.95.5.2]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mlw3X-1lDTj60mG3-00izBh; Wed, 05
 May 2021 13:24:27 +0200
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
To: Gregory Heytings <gregory@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN> <83bl9q676g.fsf@HIDDEN>
 <1a73bd6c69e27aed1fbd@HIDDEN> <83y2cu4p0g.fsf@HIDDEN>
 <1a73bd6c6998b2e086fc@HIDDEN> <83tuni4mwi.fsf@HIDDEN>
 <1a73bd6c69c2cc8827d5@HIDDEN> <83r1im4jct.fsf@HIDDEN>
 <bdf91dc6-f4ad-7fdd-466d-d6630dcebb54@HIDDEN>
 <70f2eadd5f0765103f13@HIDDEN>
 <2f30b9c9-788f-502b-aeab-1b349fed997a@HIDDEN>
 <70f2eadd5f9ecb2b5f2a@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <b9b124ec-f76e-c4ca-901b-f80be78420b8@HIDDEN>
Date: Wed, 5 May 2021 13:24:24 +0200
MIME-Version: 1.0
In-Reply-To: <70f2eadd5f9ecb2b5f2a@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:rMRhmbhSBpIHrjYYYk5NnrICP9juvdXRQNFMjN69thJHnXEZgH+
 g/UC7DPnnL4/qj7lpfPhBB1rTVUC+zTRmqYPnYWKnazgu5fXR1BVX+Y9bsMWG0pmH+7U4dS
 a58XGrkR+Y9qTPt8O850RATLvbOrWjSgNirku6ijUZnuqctW5qIUBt3T3jJTALJcLpxLsmI
 P5weU/pY5mZSBxrMxZNag==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:/PC/H9wBecw=:QF30p5pAZzX51MSBVXBscg
 K+/VsnB4CTDEW/CrHUKNlBjHmClEKLAmMd7Y2B6ckJ+D1mIxRCdtMq6FeZMqeUCASrvXC0nk3
 6ptljwFJdgsE/+wqof8rmfjjl83eBbRx7TuYGV1A46Kud1b7SPNKHkneyb74nz4VHXllPKGOl
 sReFUDC07SeBNJoBLkoWHWBp2204vX/ZzyCNWtB3+EV1vAzUnEUFbpihkCx2+ATxpzres8xUE
 An59m8sMsfbzPfOeCsIt94yyga+Cnh8hQyljWazq8aFnuFcmvPTPWzXXED2V8G7nHx3r2NEtx
 E9xheBRnk4Z3Oh7HMabF0M3E6nglNnt2GABDTT6Fp76UR50oA+RsPCcA9dRBFyXBqRZ2YGhlI
 nvVmKShXz8Cx6eMET8FxSYnPaYvJP9b8SE1HqdgH+tMmUjX+cqfR5TQTYpgiSZsti1PaUdIMA
 TbrjVdHrYmuUXHlCTHyodQ+Z9MYKInATgrYCjc+ITk498Cb3JhGxhzxC3+a/4zCIOluVQniJ2
 xdcwrpcdGi/9GmeKARHgy7RnYFlLUwjcICIGFZNwzCAXEQKcpk1EUMHJgJdoV90lJm0YFtcYp
 eE97x67Qizb0qYhi8aQLLI/yKtMe6l7fmsQceFCZWTUf15gi5gEkXK12e06XtZIbe1dgDt8Uc
 Ef1cX1eDmkEMTc0jlpo2sEKxJwqJJPJYdgLJLdQ/xn+1XnkbXtrVwsp9SwYYfgOh8C3yIcR85
 rLs+zT1sMbZTDbsaLFjBwS2Grf+2QTFg28QqIfy3Ssi7OI38MZqlxZJtDBy67Bu0XG2ktckfg
 ziV8kxLAwN8tF8qp6dIf7QOq+u8WdHYdxDzj80X4Cx7fi0RKacWIRFuXjR+oa1YUl83hbV682
 gbW5+URHjEeNFwfwusvmf1ODocdosybGiy8tGclI/ocj9fzfPK3QMa8SqSoyy5bjKj0nVYo66
 COfzD3teHgR9e2LvHbvKaiC4sqK12QYSEKcAI3JRRol1U1GuwIwPAYAGfMayhi44rdE2gl4A8
 0XUR1oRFMChBJje2ZP9N77hsbqTL0iNclXOmFG+EO0ybq5E1/ABAu65J6Yut8u1B/Xp3naP+b
 VQiGpgZK674BF38qGy9FDwtCt3lQfUuxg0vIdeRz+unYDEGY8/mV3IzsOsgw6Ilr4T2ut7Vqn
 snckSFy/6Htscuv8uG7bH0/MNkkeLwNUfcVdZO6opok/pk4Eb4paoXUz7AMrZvRflwGZU=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47969
Cc: Eli Zaretskii <eliz@HIDDEN>, 47969 <at> debbugs.gnu.org, robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> What is your value of `focus-follows-mouse'?  Also my WM does auto-raise a frame whenever it gets focus.
 >>
 >
 > As I said, its value is t.

You're right, I missed that.

 > My WM also auto-raises a frame whenever it gets focus, but in spite of this it is the non-raised frame (the minibuffer one) that gets the user input.

OK.  So let's do whatever you consider TRT here.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 5 May 2021 09:40:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 05 05:40:35 2021
Received: from localhost ([127.0.0.1]:59045 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1leE1D-000788-LZ
	for submit <at> debbugs.gnu.org; Wed, 05 May 2021 05:40:35 -0400
Received: from heytings.org ([95.142.160.155]:38394)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1leE18-000780-Qf
 for 47969 <at> debbugs.gnu.org; Wed, 05 May 2021 05:40:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620207629;
 bh=ttxSL4zxzZ6Lc+qcVfgqkYrQtI2NmjB0F0PzJCJzvRg=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=RoFMvIY3KZg54acWleadnc8BQmtKElmV9pyfFc7Z4Gj4eegmZL9P/uHrTo5yOGy27
 uTEHoTsJF2YqGirkDsxmYNYce6eUXhplrOOG82/MperPg094CchAJlKcQYj4w/DrCq
 gjsMQxiXQZtDLJxIMYb1b69LO0FPcOoI7JZ0oK98sI9VD+Cvt66us6DSlwOykdZvl0
 ojVjz3e2rbSaIU1etmhRqsGS9er4nwaocAicAtwSHe2agLsF4m/hJW2TPYbll9+9Kr
 u+OcbdMFPVbmRD98AcaAjbLVIeiOQzPEeezPKbRmieit0hu0QtgsMDveOw2Dur3yyp
 JM2FNTlQytAmg==
Date: Wed, 05 May 2021 09:40:29 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <2f30b9c9-788f-502b-aeab-1b349fed997a@HIDDEN>
Message-ID: <70f2eadd5f9ecb2b5f2a@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN>
 <83y2cv6773.fsf@HIDDEN> <1a73bd6c69efd6282e57@HIDDEN>
 <83bl9q676g.fsf@HIDDEN> <1a73bd6c69e27aed1fbd@HIDDEN>
 <83y2cu4p0g.fsf@HIDDEN> <1a73bd6c6998b2e086fc@HIDDEN>
 <83tuni4mwi.fsf@HIDDEN> <1a73bd6c69c2cc8827d5@HIDDEN>
 <83r1im4jct.fsf@HIDDEN> <bdf91dc6-f4ad-7fdd-466d-d6630dcebb54@HIDDEN>
 <70f2eadd5f0765103f13@HIDDEN>
 <2f30b9c9-788f-502b-aeab-1b349fed997a@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: Eli Zaretskii <eliz@HIDDEN>, 47969 <at> debbugs.gnu.org, robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>>> I have no good idea here but note one aspect: When a user has the 
>>> minibuffer on a separate frame and her WM does focus-follows-mouse, 
>>> moving the mouse between frames will select another window.
>>
>> Are you sure?
>
> No.
>

;-)

>> I just tried it (I enabled focus-follows-mouse in both my WM and Emacs 
>> and mouse-autoselect-window in Emacs), and with Emacs 25 (i.e. before 
>> 3fdd3bb56c) and with Emacs 28 with my patch, moving the mouse between 
>> ESC and x, or even later, does not select another window.  The user 
>> input is redirected to the minibuffer, even when it is not the 
>> currently selected frame by the WM.
>
> What is your value of `focus-follows-mouse'?  Also my WM does auto-raise 
> a frame whenever it gets focus.
>

As I said, its value is t.  My WM also auto-raises a frame whenever it 
gets focus, but in spite of this it is the non-raised frame (the 
minibuffer one) that gets the user input.

>
> And finally there's Bug#16681.
>

I wasn't aware of that bug.  I just tried it, and I can't reproduce it, it 
works correctly with and without focus-follows-mode t, so it seems to be 
fixed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 5 May 2021 09:25:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 05 05:25:40 2021
Received: from localhost ([127.0.0.1]:58966 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1leDmm-0006vC-H9
	for submit <at> debbugs.gnu.org; Wed, 05 May 2021 05:25:40 -0400
Received: from mout.gmx.net ([212.227.17.20]:48583)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1leDmi-0006v6-M1
 for 47969 <at> debbugs.gnu.org; Wed, 05 May 2021 05:25:38 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1620206727;
 bh=SZVH0JdZL+R2BMAuYOxFfv2AxDaUExKO5CKnSfntuHw=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=OCSGxkiRZ7vQWZ9I56KPcCgYMht+VFw0gX8jA/K6YrQUg8IuPnnAvECRm/vuswHk2
 7OjqajtCbVLkSoux1teXZ40IW8EutTF++3xYGGXf9kRjtQwjwyIN/L08IbB+CpOg3A
 uPQb0Gyqi+a8fLCfg4ghTAD3StlZRxsYptEbBP8I=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([212.95.5.2]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MPXhK-1lqozN25oo-00MeoE; Wed, 05
 May 2021 11:25:27 +0200
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
To: Gregory Heytings <gregory@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN> <83bl9q676g.fsf@HIDDEN>
 <1a73bd6c69e27aed1fbd@HIDDEN> <83y2cu4p0g.fsf@HIDDEN>
 <1a73bd6c6998b2e086fc@HIDDEN> <83tuni4mwi.fsf@HIDDEN>
 <1a73bd6c69c2cc8827d5@HIDDEN> <83r1im4jct.fsf@HIDDEN>
 <bdf91dc6-f4ad-7fdd-466d-d6630dcebb54@HIDDEN>
 <70f2eadd5f0765103f13@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <2f30b9c9-788f-502b-aeab-1b349fed997a@HIDDEN>
Date: Wed, 5 May 2021 11:25:25 +0200
MIME-Version: 1.0
In-Reply-To: <70f2eadd5f0765103f13@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:Ne9Ji/Q1ElBe0NoiafERHGKxCJ7Yw3EJRR26EL1pf7MesWPm8wh
 XVnrRXHRu+u92nBki1IEKByOXdFR4b1pfH2YT6DGUKrJVKwVpMXMLVCVWY3716eiTsx2VV0
 3IHF4zpFobTXz/El9NvIHkIOYUVZAHfCLncgCmf1bmoFDllM8p+s7C3HLbAP8NE2VB6ka6u
 QNyOBBSyCPDjz4w8X+2FQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:FPkN46L+wyM=:ajJWUCtq+7FOcRbai2DUss
 YUp3pw9NMgCRugEZp77Gi/qa1PFqF1Li0XG1uBUAi8Pnj7OQhqaLkeHFYXqCjgOY1hoQls4OP
 PQztSBtlbk9dOsDw5dFLuObiFFA8Ql10pcvRE5ym4/Y9SnqWuY6vB/mwLuti5Faurid8gZOtd
 MOPRyKIDEkC0kKpBg12w32Rx8gKkwbMqieVVm/HDbplYmxjku4mveiDM40x3NQSPVVjw78mfV
 BMiihuqsAfWQpbX5cTbGMq6v8OJBna/ETf56iXO1GNMq1BYrBb/GTj3Y61cJB7Cl//zTic8YR
 Mz4RCEHC16H3lrCn46vAAuuZylxbyTebYHp4kSe4DMk6+vVuk/zI2W9O3mCbpa4a/SWMrHEhX
 7tvUwV16DrNbgXCsMQCWK8OfRuLfKQFODEW+AyCrBAHb3n86tXf9esdY7hrpHBNiM0DdZLaRx
 rIFfgSEz6ihWNrUuWKHFdUvw4vXKciSzFY2/Gwbcs8oL8riaeoIRH5GdJ9NH7luCAaXJcQGfJ
 6Karjcpe+TZdOA9L6XBs3h9OULD0mMhIJ8ie+H+2zt26HjJb80NdbddguiM/hX669vIaQ/jdg
 6WEOSEOCjCQozOKENFwTkyYpzK4nqY29ZEMLtQNoGB2j0t1H3bCADHCbldANSYhq5kMgFOjXF
 mu6pM2zw4KOjq7T9FjxZYBIW6JtRd6u22CXLj9V8wvnwduRKUJHJOD1Jp6N6+n4urcx6XEiJQ
 fskIYWpN4wul2ulrGn6KoeEKbtRLNMfSqB3fzBYjWbToBuNbfu1Xq0RCEQX+f/W6rByQZl6LW
 JcBFY74rcQ6ruN+L+3FaRZUOKjExvZr87KocGiKzIu/HM6veit0Xnj+YSl1K2R3M3Qe7Eq7Vy
 gCZgDASaEsDQpZTraNVP4Muf1YrlYWUrhN7rOEVSER07mXK6K+U0JIG5oOWB/Wswmo7Pk6zPr
 +3/hBAeP24roz1jgaeEq2Nbd0YpuXMdnl3O2Ra9TSJb+/259SubrBUNVxKU+0ZgFTe63CTO2o
 Tw+fEYF9N6IJU+pjvfHhbkYMsRwL/kRnHQDLPPhnE59QqWP+bzxCcPdaLWnJeu8N+RR2ee0jU
 1Gs/CuDz3wjZwsm9l3oE+P9H6Y2yO5OCeew6zUWfXd+U6jH9YMy5B386AcrqGWOEBvUtdFz94
 jnyJfDDxJhIsHOb1he1PO+Fnix4SD7aJW8FnaofbU/4arYxQObr2Rs7n9IW64ZkESXCI4=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47969
Cc: Eli Zaretskii <eliz@HIDDEN>, 47969 <at> debbugs.gnu.org, robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> I have no good idea here but note one aspect: When a user has the minibuffer on a separate frame and her WM does focus-follows-mouse, moving the mouse between frames will select another window.
 >>
 >
 > Are you sure?

No.

 > I just tried it (I enabled focus-follows-mouse in both my WM and Emacs and mouse-autoselect-window in Emacs), and with Emacs 25 (i.e. before 3fdd3bb56c) and with Emacs 28 with my patch, moving the mouse between ESC and x, or even later, does not select another window.  The user input is redirected to the minibuffer, even when it is not the currently selected frame by the WM.

What is your value of `focus-follows-mouse'?  Also my WM does auto-raise
a frame whenever it gets focus.  And finally there's Bug#16681.

 > Is autoselection really necessary?  An click does the job in this case: the window in which the click happened is selected, and the minibuffer is suspended.

I never use double-clicks.  So clicking into any window usually means to
move the cursor to the position where I'm clicking at.  Focus follows
mouse avoids that.  And within Emacs I'm using mouse autoselection to
avoid that point moves to the position I click at.  IIRC we have some
workaround on X to avoid that but I didn't like it because I want single
mouse clicks to set point.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 5 May 2021 09:02:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 05 05:02:15 2021
Received: from localhost ([127.0.0.1]:58765 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1leDQ7-0006Yn-Ej
	for submit <at> debbugs.gnu.org; Wed, 05 May 2021 05:02:15 -0400
Received: from heytings.org ([95.142.160.155]:38330)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1leDQ4-0006Yh-M5
 for 47969 <at> debbugs.gnu.org; Wed, 05 May 2021 05:02:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620205331;
 bh=3SxfPnQ4fktZ4B9jx4O5pshgfQibeX3MZiDT8JozpkM=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=uswe7p7Ero5faPtJDeKWbRkrqop6uiRqFdeHtL/uICSMDXZh7y2ac+Kr/MGBsV1xQ
 AceV9sEA9AVvStaabhcWh9TxrYYuirRfnTuP8VBQ0HQNeOS0kkkpR9RZiINEygzKq8
 AAKt9rA7ZJkhrR6F1BcWbd5N/BSHwBVyl1Ay3UfJjhfuL1R/cSKpdcGmkTn2cDCteW
 ompgJSZ+6vHqAu8PrH90Z5MwL1WQmFzjeQ6HY8L6l6DkSa4Z8ITFtUKn3l9djsWysa
 Zz8wP8ugZKh8jVav4iQetr1THft3MOUBLKgOQqAGVr+p3Kf4JRTNJxVfM4A8akCo/c
 n3NSuIFO3k7lQ==
Date: Wed, 05 May 2021 09:02:10 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <bdf91dc6-f4ad-7fdd-466d-d6630dcebb54@HIDDEN>
Message-ID: <70f2eadd5f0765103f13@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN> <83bl9q676g.fsf@HIDDEN>
 <1a73bd6c69e27aed1fbd@HIDDEN> <83y2cu4p0g.fsf@HIDDEN>
 <1a73bd6c6998b2e086fc@HIDDEN> <83tuni4mwi.fsf@HIDDEN>
 <1a73bd6c69c2cc8827d5@HIDDEN> <83r1im4jct.fsf@HIDDEN>
 <bdf91dc6-f4ad-7fdd-466d-d6630dcebb54@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: Eli Zaretskii <eliz@HIDDEN>, 47969 <at> debbugs.gnu.org, robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>>> Indeed, with that understanding there is no contradiction.  But what 
>>> "autoselection [...] never unselects the minibuffer if it is active" 
>>> means in practice is that autoselection is disabled while the 
>>> minibuffer is active.  If you M-x, move the mouse to another window, 
>>> type a command and RET, no autoselection happens.  I'm not sure that 
>>> the complexity of what you suggest is worth the price for this 
>>> specific case (ESC x instead of M-x), given what the behavior is with 
>>> M-x.
>>
>> I'm not sure either, but let's hear Martin at least, and I hope Lars as 
>> well, on that idea.
>
> I have no good idea here but note one aspect: When a user has the 
> minibuffer on a separate frame and her WM does focus-follows-mouse, 
> moving the mouse between frames will select another window.
>

Are you sure?  I just tried it (I enabled focus-follows-mouse in both my 
WM and Emacs and mouse-autoselect-window in Emacs), and with Emacs 25 
(i.e. before 3fdd3bb56c) and with Emacs 28 with my patch, moving the mouse 
between ESC and x, or even later, does not select another window.  The 
user input is redirected to the minibuffer, even when it is not the 
currently selected frame by the WM.

>
> I sometimes start a dialogue and, in order to finish it, look into some 
> other buffer and maybe even start some recursive dialogue before 
> returning to the prior one.  While doing that I probably would like 
> autoselection to behave as usual.
>

Is autoselection really necessary?  An click does the job in this case: 
the window in which the click happened is selected, and the minibuffer is 
suspended.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 5 May 2021 07:25:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 05 03:25:41 2021
Received: from localhost ([127.0.0.1]:58221 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1leBuf-0004ZZ-5o
	for submit <at> debbugs.gnu.org; Wed, 05 May 2021 03:25:41 -0400
Received: from mout.gmx.net ([212.227.17.22]:41023)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1leBua-0004ZL-Vv
 for 47969 <at> debbugs.gnu.org; Wed, 05 May 2021 03:25:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1620199528;
 bh=fAl6b4b2Mp6UDPoL9P5owvnaNaJm9ZHvCg98D4iaX9U=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=YGk1DsIFpi8HE5JFL7gfdVjkFojeYBibZglD2FqgrxgSaTFUgEm+ETcZTTPIWmrpo
 tbA74KeTK46STI3DrvgEN02T4HkPFCdQjFfDtTLH/aQRRXPB/X87Fj5HXZoIweXX0C
 9R++Oz0owUqUqzlKybnT6qhPS3LLUBpU1ZhtzlgY=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([46.125.249.109]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Ml6qC-1lHGDM0HpE-00lSLs; Wed, 05
 May 2021 09:25:28 +0200
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
To: Eli Zaretskii <eliz@HIDDEN>, Gregory Heytings <gregory@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN> <83bl9q676g.fsf@HIDDEN>
 <1a73bd6c69e27aed1fbd@HIDDEN> <83y2cu4p0g.fsf@HIDDEN>
 <1a73bd6c6998b2e086fc@HIDDEN> <83tuni4mwi.fsf@HIDDEN>
 <1a73bd6c69c2cc8827d5@HIDDEN> <83r1im4jct.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <bdf91dc6-f4ad-7fdd-466d-d6630dcebb54@HIDDEN>
Date: Wed, 5 May 2021 09:25:26 +0200
MIME-Version: 1.0
In-Reply-To: <83r1im4jct.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:EntaSHaYmILmkJDFAEP6zmWH2ixYG/UkXWPlCqfnz1SS0UYH1u3
 ayILFrpGR1SCgJ93H6Dg9g/sva8vd0lYibeu0htitHC7vbkvtifd/yoVyVVC1F6Yq0orfoJ
 oY4gIQgrrCAiDctjuhCWKh2QBjfYsXWjHuHO1ipgPcY28pLGiNu3JtXKbbDaKnnN+0LhoFI
 IWeUpkOEhJ+Qnbvijtb7g==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:IYpoz41tOfU=:zxf6tmNxLy3aehAYCqQrwH
 AxXK66t11XrEB9cz2W1O7oUZTVi2sIEjjvH7KfXKvxzCGOFuZQyY4uVpdwUmOiiaKhiRwZHuq
 gV7NfylfEcwIi7rPz6Ir5ojc0rtedW52FnnoJyPNAjN6TBDAbnnYe9Xsb0uRMrao0MMqP8Jh1
 Bjywss4+WU3TZbi7h/J/aZuG2orMv9a4QewM09BcZZy2BjftBFFhzAZ+xJnHVJai6wh6ZFVuY
 hCvo4iSH1pOMsKnEM94WWqzp8LTImnsADwl6H+U5iZoAb2EptCV167OaWGKwCsq3J8hQTRuGg
 h+djxWZj/u8nnGYlX6vMSgIQOvfwHQ43OTMPhquyvDxP7bYU5fR4vzxkjTBmn432lXvCjKZAl
 fGg8jIKC7LVpbLVmV/RTM1d7tNvlZntbFrna3bJVb9K2L7yq+jPhZkp0k2wwlaH036Y1BWQP6
 QqEc1UnKMMT2s3dJj51iE4Q+rrFMNMDH1JBZ76ggCZsO0U/+th2gRm5/RJyerv7vZFOH9kdvc
 13ay439AO6FAszjSmrVvagrSa+GHqH4Sn4wM1kgu2jXrcRG2JA7InoiLTOpGdo6RueK1vEs08
 KOlTllX8DwJrXZml32HQ8OB0piNAd6tr/3T2v5Bnzz5Om/3dYVcbpIzMpg74SnbFTb3i3hS8j
 L1ti1GhfnFWlpLTsQnfPHWFlfKp6pF7Edqm/++hXCdFeSqVyXmGS2mTHd5wJRyEtpZCzbHA/P
 yMBPmAW+KLWOSFx4tK+wPfxkAl2HbGUNLrJFjhSKaz+5VC1bdfm9xTmEjJEQ7KUDeGO75CKJi
 5FtNa5loaDd0WQumswaYKlUlHf3jrHvquKTa8t/O1mKcflD5oxfH7RlbBGO8gir8kQ4hUyNm/
 7eQFKi75OKnOWpGsKQH4rkp8JCi3ceUm17KRgXD5MI09tyuNsEeafbklikaVV4jDqbyrfmkjY
 VtD5v5zASkzRAtsGfSz7d0oX//VAh78KdCpzWbz8452Zjdl4fkRZACBv8CbxeXPBrmIDb7YmE
 D+W6vgpLuS+nyERwvEBQgBOGOmVV08jDU8sHMoTW4WNG4/1Vj9U+3U6zxVE8oLbwEcjlEr/B+
 CP3h/rXhFR4EGXwq5BuYWC97AswvKV1Ao+TZll4dQFK1ZirSHNEt3PLADXt9ntyd1iO+L4wfC
 9klD5TzqDUpvbvMAmSAwer49nD3PUPVZ008asVuLmyDXP09gHzSFCre1NY4DtGsE+Rajk=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47969
Cc: robert@HIDDEN, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> Indeed, with that understanding there is no contradiction.  But what
 >> "autoselection [...] never unselects the minibuffer if it is active" means
 >> in practice is that autoselection is disabled while the minibuffer is
 >> active.  If you M-x, move the mouse to another window, type a command and
 >> RET, no autoselection happens.  I'm not sure that the complexity of what
 >> you suggest is worth the price for this specific case (ESC x instead of
 >> M-x), given what the behavior is with M-x.
 >
 > I'm not sure either, but let's hear Martin at least, and I hope Lars
 > as well, on that idea.

I have no good idea here but note one aspect: When a user has the
minibuffer on a separate frame and her WM does focus-follows-mouse,
moving the mouse between frames will select another window.  I doubt
that we can impose any restrictions for minibuffer dialogues in such
case so we have an inconsistency.

Basically, it all boils down to whether we want our minibuffer
interactions be modal or not.  I sometimes start a dialogue and, in
order to finish it, look into some other buffer and maybe even start
some recursive dialogue before returning to the prior one.  While doing
that I probably would like autoselection to behave as usual.  OTOH a
strictly modal dialogue like `yes-or-no-p' should probably disallow
autoselection.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 4 May 2021 15:19:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 11:19:53 2021
Received: from localhost ([127.0.0.1]:53752 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldwq1-0000Ip-CK
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 11:19:53 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33908)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ldwpx-0000If-QU
 for 47969 <at> debbugs.gnu.org; Tue, 04 May 2021 11:19:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53863)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ldwpr-0006Gj-Qv; Tue, 04 May 2021 11:19:43 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1667
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ldwpq-00087r-W2; Tue, 04 May 2021 11:19:43 -0400
Date: Tue, 04 May 2021 18:19:30 +0300
Message-Id: <83r1im4jct.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
In-Reply-To: <1a73bd6c69c2cc8827d5@HIDDEN> (message from Gregory
 Heytings on Tue, 04 May 2021 14:43:01 +0000)
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN> <83bl9q676g.fsf@HIDDEN>
 <1a73bd6c69e27aed1fbd@HIDDEN> <83y2cu4p0g.fsf@HIDDEN>
 <1a73bd6c6998b2e086fc@HIDDEN> <83tuni4mwi.fsf@HIDDEN>
 <1a73bd6c69c2cc8827d5@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47969
Cc: rudalics@HIDDEN, robert@HIDDEN, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 04 May 2021 14:43:01 +0000
> From: Gregory Heytings <gregory@HIDDEN>
> cc: rudalics@HIDDEN, 47969 <at> debbugs.gnu.org, robert@HIDDEN
> 
> Indeed, with that understanding there is no contradiction.  But what 
> "autoselection [...] never unselects the minibuffer if it is active" means 
> in practice is that autoselection is disabled while the minibuffer is 
> active.  If you M-x, move the mouse to another window, type a command and 
> RET, no autoselection happens.  I'm not sure that the complexity of what 
> you suggest is worth the price for this specific case (ESC x instead of 
> M-x), given what the behavior is with M-x.

I'm not sure either, but let's hear Martin at least, and I hope Lars
as well, on that idea.

If we eventually go back to your last proposal, I think it would be
slightly better to test that the selection was invoked via
select-window "key", instead of testing the mode.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 4 May 2021 14:43:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 10:43:04 2021
Received: from localhost ([127.0.0.1]:53598 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldwGO-0008Qm-8p
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 10:43:04 -0400
Received: from heytings.org ([95.142.160.155]:37320)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldwGM-0008Qe-LR
 for 47969 <at> debbugs.gnu.org; Tue, 04 May 2021 10:43:03 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620139381;
 bh=VDJkNElvfcLRsU8n5GjWQVdHAT4oIwl3Aaevd9vFdpI=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=YqdNYFrPeR0vogXnMzMn+/GvAzPQ/KfYUarRucTGBtzUZ/Z74ov7ngDL6WErpGwrf
 f8a6INEHcl5L6iyNMyIDjYwGNPmzDtDNqKrSY9knwd2FWBQv+S3JqbSnC2uVqLpsHN
 na6sXzSG/kL0+DR06qRRaPa64Vaclnz5olZsK22aXrHKbS8EZia8OgjUH94Shbuq2P
 BlH4kkbCPxRAJf0SEjcdFd2uJWTfgl51U7WIMlU7d98Ap6ApRkXIZzZYdx/8bhej3R
 dNnjV2px9U5Q6bzAUC/J+rRW3tgHQHdCFt4NBfhQt0AfhTpZ0DV4O8uLFyuhdlJrC+
 s6mbe0gtcrEpg==
Date: Tue, 04 May 2021 14:43:01 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <83tuni4mwi.fsf@HIDDEN>
Message-ID: <1a73bd6c69c2cc8827d5@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN> <83bl9q676g.fsf@HIDDEN>
 <1a73bd6c69e27aed1fbd@HIDDEN> <83y2cu4p0g.fsf@HIDDEN>
 <1a73bd6c6998b2e086fc@HIDDEN> <83tuni4mwi.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: rudalics@HIDDEN, robert@HIDDEN, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>>> 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?
>>
>> Would doing that not contradict the docstring of 
>> mouse-autoselect-window, which says: "Autoselection [...] never 
>> unselects the minibuffer if it is active."?
>
> I don't think so, because the selection will be after the user exits 
> minibuffer?  Or what am I missing?
>

Indeed, with that understanding there is no contradiction.  But what 
"autoselection [...] never unselects the minibuffer if it is active" means 
in practice is that autoselection is disabled while the minibuffer is 
active.  If you M-x, move the mouse to another window, type a command and 
RET, no autoselection happens.  I'm not sure that the complexity of what 
you suggest is worth the price for this specific case (ESC x instead of 
M-x), given what the behavior is with M-x.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 4 May 2021 14:03:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 10:03:24 2021
Received: from localhost ([127.0.0.1]:53424 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldve0-00087m-93
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 10:03:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43450)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ldvdv-00087g-Oj
 for 47969 <at> debbugs.gnu.org; Tue, 04 May 2021 10:03:23 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52243)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ldvdp-0003Fb-Qs; Tue, 04 May 2021 10:03:13 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4962
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ldvdj-00048P-I7; Tue, 04 May 2021 10:03:12 -0400
Date: Tue, 04 May 2021 17:02:53 +0300
Message-Id: <83tuni4mwi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
In-Reply-To: <1a73bd6c6998b2e086fc@HIDDEN> (message from Gregory
 Heytings on Tue, 04 May 2021 13:26:53 +0000)
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN> <83bl9q676g.fsf@HIDDEN>
 <1a73bd6c69e27aed1fbd@HIDDEN>
 <83y2cu4p0g.fsf@HIDDEN> <1a73bd6c6998b2e086fc@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47969
Cc: rudalics@HIDDEN, robert@HIDDEN, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 04 May 2021 13:26:53 +0000
> From: Gregory Heytings <gregory@HIDDEN>
> cc: rudalics@HIDDEN, 47969 <at> debbugs.gnu.org, robert@HIDDEN
> 
> 
> > 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?
> >
> 
> Would doing that not contradict the docstring of mouse-autoselect-window, 
> which says: "Autoselection [...] never unselects the minibuffer if it is 
> active."?

I don't think so, because the selection will be after the user exits
minibuffer?  Or what am I missing?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 4 May 2021 13:26:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 09:26:58 2021
Received: from localhost ([127.0.0.1]:53222 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldv4j-0007l2-RN
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 09:26:58 -0400
Received: from heytings.org ([95.142.160.155]:37216)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldv4h-0007kw-Io
 for 47969 <at> debbugs.gnu.org; Tue, 04 May 2021 09:26:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620134814;
 bh=o9goQFEqY0c8rXVCCl4fo8bTzPwOD4qISX6cbZnQnPo=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=KuycrGzWyrXsi8DHFmktLMFRUqAq14qv37bPsO+HZNns8d23g3TyemAx5tK/R6ngY
 ZYxTRaxSJg9btk7EW2hl7q7V3Ic9TE2EXs8zSkLaTBQsfYxRp/txYEnMIz9MHFghXG
 ypTq+OqsCQF7b9PIgdiiukLpdHmCfFeZZw/Rq4vHhMGGMVmtDFx92y1H8evrYmdZFX
 ZpPvOlKQO0l2l+B9kA1k+e5SXZ9WJbrs68T3+tf53jBwUgtrb4aJIBBLoCIXUQqBFg
 7/m0087FoDA+6Mr0ClRaKEmS1XomNBixCiROJexOqjnf1gzeG663Wa7VYOq8qkzAsN
 R37I3hfREo3IA==
Date: Tue, 04 May 2021 13:26:53 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <83y2cu4p0g.fsf@HIDDEN>
Message-ID: <1a73bd6c6998b2e086fc@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN> <83bl9q676g.fsf@HIDDEN>
 <1a73bd6c69e27aed1fbd@HIDDEN> <83y2cu4p0g.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: rudalics@HIDDEN, robert@HIDDEN, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> 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?
>

Would doing that not contradict the docstring of mouse-autoselect-window, 
which says: "Autoselection [...] never unselects the minibuffer if it is 
active."?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 4 May 2021 13:17:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 09:17:45 2021
Received: from localhost ([127.0.0.1]:53172 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lduvp-0007g1-0x
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 09:17:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60888)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lduvm-0007fv-PT
 for 47969 <at> debbugs.gnu.org; Tue, 04 May 2021 09:17:43 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51453)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lduvf-0002F0-Uc; Tue, 04 May 2021 09:17:36 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2173
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lduvf-0008LP-99; Tue, 04 May 2021 09:17:35 -0400
Date: Tue, 04 May 2021 16:17:19 +0300
Message-Id: <83y2cu4p0g.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
In-Reply-To: <1a73bd6c69e27aed1fbd@HIDDEN> (message from Gregory
 Heytings on Tue, 04 May 2021 13:04:58 +0000)
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN> <83bl9q676g.fsf@HIDDEN>
 <1a73bd6c69e27aed1fbd@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47969
Cc: rudalics@HIDDEN, robert@HIDDEN, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 4 May 2021 13:05:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 09:05:01 2021
Received: from localhost ([127.0.0.1]:53100 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldujV-0007Yc-Ig
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 09:05:01 -0400
Received: from heytings.org ([95.142.160.155]:37152)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldujT-0007YL-Rg
 for 47969 <at> 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==
Date: Tue, 04 May 2021 13:04:58 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <83bl9q676g.fsf@HIDDEN>
Message-ID: <1a73bd6c69e27aed1fbd@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN> <83bl9q676g.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: rudalics@HIDDEN, robert@HIDDEN, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 4 May 2021 12:00:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 08:00:01 2021
Received: from localhost ([127.0.0.1]:52792 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldtib-0004k9-E3
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 08:00:01 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40052)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ldtiY-0004k1-Ls
 for 47969 <at> debbugs.gnu.org; Tue, 04 May 2021 07:59:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49912)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ldtiR-00030N-U9; Tue, 04 May 2021 07:59:51 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1336
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ldtiR-0003d1-1F; Tue, 04 May 2021 07:59:51 -0400
Date: Tue, 04 May 2021 14:59:35 +0300
Message-Id: <83bl9q676g.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
In-Reply-To: <1a73bd6c69efd6282e57@HIDDEN> (message from Gregory
 Heytings on Tue, 04 May 2021 07:41:53 +0000)
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
 <1a73bd6c69efd6282e57@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47969
Cc: rudalics@HIDDEN, robert@HIDDEN, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 04 May 2021 07:41:53 +0000
> From: Gregory Heytings <gregory@HIDDEN>
> cc: martin rudalics <rudalics@HIDDEN>, 47969 <at> debbugs.gnu.org, 
>     robert@HIDDEN
> 
> > 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.

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 4 May 2021 07:41:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 03:41:58 2021
Received: from localhost ([127.0.0.1]:51421 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldpgs-0005m6-0b
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 03:41:58 -0400
Received: from heytings.org ([95.142.160.155]:36768)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldpgq-0005m0-63
 for 47969 <at> debbugs.gnu.org; Tue, 04 May 2021 03:41:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620114114;
 bh=TxP6FWyfDL4+vfyTz8st6kABQ5HBYdVAYU2JcCUsDD0=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=qgmL3G+wuF+rFBFe7c+223rRCH6lyHJK582bUYp+EM0aBxKzLkIt1o1KFaLGS9Z/W
 v1OxKoQggG0jgLV50iw1Fxs/VRrz2koWa44DQzE/bsQmNLeNrP/6H9b52IXj4UjxvD
 n/DHeWVgGuAiHxOstNCtTo9+gCC5CcHWnqCAy4No37LJD5/JWw0HoGs5DwVtDGB5WR
 Zy+lYw39wnhnDmZCjwnU9OrdqA4ukcZIh6AN0vFZNj/9TGbDx7rc6lke4mPJo0uTDx
 8hQ1oX7C5e6fHkDJ+34NTPu4YEP5vWzxiSbcDSyDj1sW1SVNlzBOTVhzogE5Fs1HqS
 Gnx8y63cieKfQ==
Date: Tue, 04 May 2021 07:41:53 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <83y2cv6773.fsf@HIDDEN>
Message-ID: <1a73bd6c69efd6282e57@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> <83y2cv6773.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: martin rudalics <rudalics@HIDDEN>, robert@HIDDEN,
 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> You mean your earlier
>>
>>> FWIW, I think we should instead temporarily disable 
>>> mouse-autoselect-window when a minibuffer is active.
>>
>> as in the untested below?
>
> Something like that (I didn't yet have time to test the patch).
>

I see what you mean, but that patch at least doesn't work; apparently with 
this recipe mouse-autoselect-window-select is never called.  And the 
problem is that between ESC and x minibuffer-depth is still = 0.

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

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 17:47:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 13:47:26 2021
Received: from localhost ([127.0.0.1]:47787 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldcfF-0003Ni-UE
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 13:47:26 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47418)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ldcfD-0003Nb-JU
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 13:47:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58963)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ldcf6-00069V-7S; Mon, 03 May 2021 13:47:16 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2316
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ldcf2-0002AY-DX; Mon, 03 May 2021 13:47:14 -0400
Date: Mon, 03 May 2021 20:46:56 +0300
Message-Id: <83y2cv6773.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN> (message from
 martin rudalics on Mon, 3 May 2021 19:31:30 +0200)
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
 <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47969
Cc: gregory@HIDDEN, 47969 <at> debbugs.gnu.org, robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: gregory@HIDDEN, robert@HIDDEN, 47969 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Mon, 3 May 2021 19:31:30 +0200
> 
> You mean your earlier
> 
>  > FWIW, I think we should instead temporarily disable
>  > mouse-autoselect-window when a minibuffer is active.
> 
> as in the untested below?

Something like that (I didn't yet have time to test the patch).

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.

Yet another alternative would be to treat the select-window event in
the middle of a key sequence specially, but I'm afraid that would be a
much more complex and dangerous change (as everything inside
read_char).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 17:31:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 13:31:45 2021
Received: from localhost ([127.0.0.1]:47705 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldcQ5-0003Ew-Hl
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 13:31:45 -0400
Received: from mout.gmx.net ([212.227.17.21]:56575)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1ldcQ3-0003Eq-1R
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 13:31:44 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1620063093;
 bh=Nq9bHjgUuNyjGHVVwI3jHkkbbhFcPvf6cyLkiDha4oQ=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=JW4EZwrdyBTOGKTYz6ygIVR9pTNPoBxS68Gz2/Ih1sgDsRSlNRbwzspCRKSoyLoht
 nQDMNkQ75wlyB12D+eT9XsDTXDkazoL5jh9bUSx+G2twDdeNo1vavr3Sstm6LAkEyj
 z9p95hX/FljgypjeGi5hHiU1//Bbsg/YsqXTIJPM=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([46.125.249.118]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M9Fnj-1lb7yM0aMp-006QrB; Mon, 03
 May 2021 19:31:33 +0200
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
To: Eli Zaretskii <eliz@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <a1cf71b5-03bc-53ac-9335-8abbc788ca72@HIDDEN>
Date: Mon, 3 May 2021 19:31:30 +0200
MIME-Version: 1.0
In-Reply-To: <838s4w6mua.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:VRSCTSrDyMgQzmIWoeY3ABBaCmk1tEBa1eI03F16oLyDDO+EO0r
 XSpZxHxftDqjOzO/IWMSyhDe2kFe4EkZPNoyahK84m7KgzSZpOImwBxICckEZXpvkC/cU9G
 RVhWWO6sGWsG/d6fICJz4ldkPcOuZdb2o5EY5LZc4jr+B8BPc1VWm3VgqJUrWblAWoV1BZ2
 IJKmXx1YKQynXUK/8HeUw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:FJRcTk8SGHY=:FjYHhQySqlgWF6Y0yeWN+1
 MUW0HkC3xX8XxRA/i1wmYj3cFLfpvfQAhPU+kBXrWozzsHeuSJRT1TErJfCqfMa7C4Ohd/Ggb
 pa4+iU+HlBwkal1ZIYTH5VUamiT2vUv40Wo+xvtplUJ2C+lCJq6KiJcJoXZPREZctccn5hIQU
 VT7O8H7rgW6XmKKzJmNBbYGb3J7/Vi4ahwRt2ZXroA+KfD9+AKL66r9MWD9B1dC16AYkd8Pl6
 KPjd8Z+KyE7QFgmQmEBgow19EdlCYQM2pYYoKDYGLePMINsyFJjjy7KZl9lDcx2DhsJVRp9nM
 x4TWXV6bRskqdbWAoOGLIxQqZIFe1l/LMleo8lrHM/szHRbDS5pUe28lvl1oAeEFim1KXK5n+
 GW8XBGkCafPt0KvruCTAF4XsJiKqsbk/xa02Vw4ET8S71BVH4LjIJOMLBp48C8Br6GpZ5ne4K
 5EZ5Qfe+tjEYmXrPRrgrz/ALCJP8bSeu/NQMvJQEV4Z1Utmzi5JrZMknOXHlDcuoVebYxV2H7
 0AreiHJwnR3EJJSHD1Ja6De7qmUwUGS71eKYHw2+X9LvZOaNnolDgUJa6HyXWxvP96Z/0SBkc
 2ylF2prTD6RyUJtKOqo0s8ZnQtbww3LCKfDZjkbY8yhntZmGXVc+GIXOCCkOZRYXxdMzGlWHJ
 k1LXyskqDW7OUzkrrRdDRSdCP+WnqXwjsuAZ8M86NeTp4vAfR9FyK5oCrunDwQIeJev+pUQKT
 P58gGGXZZZrzDIlncuvSRf/S39Uf0I4rFnHEx0CzZv216XE3kss7f8XztSK7VX7jgHxOv4+SE
 NOqB1wqEjsa0WwJFTEPMqfOxLFR9suJPImn5gfWl+MaF9y7ZaZxE/9GNuBlCq371Nv0U4GdCv
 SgbQXFh25+MrEjqynyVJt7Hz5ul6LVljec6ZtYMo/hr8Fv3zbaQR3MmmJfNDLW+6BA1SZ6/D4
 sOhXVr0invPcgTybdp1TQ10Xx+wMllHgdiuAZs2gs9TPPf2jD5fgvd9aQFVYWM/7z16/Nh5kJ
 krx77PoAnHTt7G/x8U4Ks4mmrCsAZzDAXGmfnV2V13B58ubm8xDNX4njY5qPjM2Y7k3W5zl6r
 Z4C1kZEAmKjnOs1PR3CJLYBu2poTgMQujsJSiHeGQjKn1BLaFkTjT2pLmFwmAS89B0w/zUEIn
 CpwSYcFDn8Y/Y4qo9LWYT7Pzsn5UsJX/SHLh+ZvEFCrxpq/eN0nWr62fPT23r1qvkAmv4=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47969
Cc: gregory@HIDDEN, 47969 <at> debbugs.gnu.org, robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > I'd actually trust your-then judgment, and instead explore the
 > possibility of solving this as I proposed up-thread.  Undoing past
 > fixes when we don't understand the effects is bad mantra, it runs the
 > risk of fixing one problem by reintroducing another.

You mean your earlier

 > FWIW, I think we should instead temporarily disable
 > mouse-autoselect-window when a minibuffer is active.

as in the untested below?

martin


diff --git a/lisp/window.el b/lisp/window.el
index f9b28fece1..b59fcd323f 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10672,7 +10672,8 @@ mouse-autoselect-window-select
           (window (and frame (window-at mouse-x mouse-y frame))))
      (cond
        ((or (and (fboundp 'menu-or-popup-active-p) (menu-or-popup-active-p))
-	   (and window
+           (> (minibuffer-depth) 0)
+           (and window
  		(let ((coords (coordinates-in-window-p
  			       (cdr mouse-position) window)))
  		  (and (not (consp coords))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 12:20:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 08:20:49 2021
Received: from localhost ([127.0.0.1]:46420 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldXZB-0003p9-JJ
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 08:20:49 -0400
Received: from heytings.org ([95.142.160.155]:35604)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldXZ9-0003p3-NV
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 08:20:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620044446;
 bh=Jf3ueb9Er0+6rnPmmz5vzefE5CgBX83gRUXXAtVkfYk=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=aONdgzxS0KBsCEnIhvhh047KezNd7769bjc9I5n6QFfqpHFCNpFCi2VDQ8zezD7M8
 ST90oGI7hGFJhCLAK5xNAH1jNIOzepAQAu207vBpncnk0nQa1mrUelfDfLa8STJJ3H
 4frX1IV0JeAVRSEGem0gRi1I4/AWZcakWxh8it8aE4lLxODnxx2DHEPXR7Z8zzJx6Y
 iTBUGwArv+NFYYSWSfTSxL6w06fx6DLbCDTaqhT/q83fL9egPIUtd/7vxObDYwNmmf
 BzDlqJjn1RCYksjDwPqo34h9BMT2C357GymiRZCT93EuL4Ebq0lv53aZPa9Wp+mdYi
 r1pdLaoKXwlcw==
Date: Mon, 03 May 2021 12:20:46 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <838s4w6mua.fsf@HIDDEN>
Message-ID: <a4dfe72ae25cdd1b582e@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN> 
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> <838s4w6mua.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: martin rudalics <rudalics@HIDDEN>, robert@HIDDEN,
 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> I'd actually trust your-then judgment, and instead explore the 
> possibility of solving this as I proposed up-thread.  Undoing past fixes 
> when we don't understand the effects is bad mantra, it runs the risk of 
> fixing one problem by reintroducing another.
>

If you look at 3fdd3bb56c, you'll see that it's a rather big commit (20 
files changed, 2543 insertions, 454 deletions), so I tend to agree with 
Martin that this likely was not an intentional change.

>> And many thanks for the bisection, great work as usual.
>
> Seconded.
>

Thanks :-)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 12:18:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 08:18:38 2021
Received: from localhost ([127.0.0.1]:46407 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldXX3-0003nV-Vq
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 08:18:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43832)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ldXX2-0003nN-9g
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 08:18:36 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51775)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ldXWu-00019V-Ar; Mon, 03 May 2021 08:18:29 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1921
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ldXWr-0006ZT-3Z; Mon, 03 May 2021 08:18:26 -0400
Date: Mon, 03 May 2021 15:18:06 +0300
Message-Id: <837dkg6mf5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
In-Reply-To: <a4dfe72ae2326f01fd6f@HIDDEN> (message from Gregory
 Heytings on Mon, 03 May 2021 12:15:18 +0000)
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN> <83k0oh8wph.fsf@HIDDEN>
 <87r1iochi1.fsf@HIDDEN> <83a6pc6nin.fsf@HIDDEN>
 <a4dfe72ae2326f01fd6f@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47969
Cc: larsi@HIDDEN, 47969 <at> debbugs.gnu.org, robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 03 May 2021 12:15:18 +0000
> From: Gregory Heytings <gregory@HIDDEN>
> cc: Lars Ingebrigtsen <larsi@HIDDEN>, robert@HIDDEN, 
>     47969 <at> debbugs.gnu.org
> 
> 
> >  M-x set-variable RET mouse-autoselect-window RET t RET
> >  C-x 2
> >  C-x ; wait for the "C-x" prompt in the echo area
> >      ; move mouse to the other window
> >  b   ; selected-window is not longer the mini-window
> >  foo ; this gets inserted into some buffer instead of the minibuffer
> >
> 
> This recipe worked, like mine, differently in Emacs 22-25: foo was 
> inserted in the minibuffer.

Of course: it's the same problem.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 12:15:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 08:15:20 2021
Received: from localhost ([127.0.0.1]:46403 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldXTs-0003ln-I3
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 08:15:20 -0400
Received: from heytings.org ([95.142.160.155]:35584)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldXTr-0003lh-RR
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 08:15:20 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620044119;
 bh=CH33MI7mxk7HB5luAtD3lIf2Fw/XTMOHqorcXPnJkfg=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=Qb1I2w6waGPQdHUqhIM33Q4WLx9sYpK2hFh2DwPTX7aqAA1U4XdfWha23veiReRnU
 +dGMMRjFwGIj0+oEL7uz5DqdNqBeg4VnEhz8fabQruw4Hli+u4Y+TjAKooTR8Ahq/y
 A5U6IVM/k1bZX7U7jt6YPNqJmHl2WpVUu1Me0bS7J9X9iMbmYgYdejd0FeYQOGLjk5
 ICjHz3vSL3BtXAQyqPqR5OnTyN9n/2a+/jzX0ZG/SRT4n0uXdQRkj+kKM7MLGueSMo
 FQv84iO68IP7g3gxR2yLukJgaT7y0gauhpLSljOZrqwyB3uivnLvQo8ELyMfRmP50k
 PoOoJTWg5al+w==
Date: Mon, 03 May 2021 12:15:18 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <83a6pc6nin.fsf@HIDDEN>
Message-ID: <a4dfe72ae2326f01fd6f@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN> <83k0oh8wph.fsf@HIDDEN>
 <87r1iochi1.fsf@HIDDEN> <83a6pc6nin.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 47969 <at> debbugs.gnu.org,
 robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> It's only in the test case described by Gregory that things go haywire: 
>> `ESC' + mouse move + `xfoo'.
>
> Here's a demo without ESC:
>
>  M-x set-variable RET mouse-autoselect-window RET t RET
>  C-x 2
>  C-x ; wait for the "C-x" prompt in the echo area
>      ; move mouse to the other window
>  b   ; selected-window is not longer the mini-window
>  foo ; this gets inserted into some buffer instead of the minibuffer
>

This recipe worked, like mine, differently in Emacs 22-25: foo was 
inserted in the minibuffer.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 12:09:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 08:09:28 2021
Received: from localhost ([127.0.0.1]:46394 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldXOC-0003iC-LM
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 08:09:28 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42230)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ldXOA-0003i6-P7
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 08:09:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51487)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ldXO4-00049B-Bz; Mon, 03 May 2021 08:09:20 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1333
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ldXO3-0005is-Mw; Mon, 03 May 2021 08:09:20 -0400
Date: Mon, 03 May 2021 15:09:01 +0300
Message-Id: <838s4w6mua.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN> (message from
 martin rudalics on Mon, 3 May 2021 14:02:13 +0200)
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN> 
 <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47969
Cc: gregory@HIDDEN, 47969 <at> debbugs.gnu.org, robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: martin rudalics <rudalics@HIDDEN>
> Date: Mon, 3 May 2021 14:02:13 +0200
> Cc: Robert Marshall <robert@HIDDEN>, 47969 <at> debbugs.gnu.org
> 
>  > Okay, I bisected this, and the culprit is commit 3fdd3bb56c. Interestingly, that commit removed the following from handle-select-window:
>  >
>  > ;; Don't switch if we're currently in the minibuffer.
>  > ;; This tries to work around problems where the
>  > ;; minibuffer gets unselected unexpectedly, and where
>  > ;; you then have to move your mouse all the way down to
>  > ;; the minibuffer to select it.
>  > (window-minibuffer-p)
>  >
>  > which happens to be what my patch adds again.
> 
> I can't give a reasonable explanation why I removed that back then, so
> please re-add it as soon as your paperwork is done.

I'd actually trust your-then judgment, and instead explore the
possibility of solving this as I proposed up-thread.  Undoing past
fixes when we don't understand the effects is bad mantra, it runs the
risk of fixing one problem by reintroducing another.

> And many thanks for the bisection, great work as usual.

Seconded.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 12:02:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 08:02:27 2021
Received: from localhost ([127.0.0.1]:46387 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldXHO-0003fH-V9
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 08:02:27 -0400
Received: from mout.gmx.net ([212.227.15.19]:52547)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1ldXHM-0003fB-Vg
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 08:02:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1620043336;
 bh=0HIgiwlJhlHyIsQuesS66OZ9UCJqVwTl+6iFthCA2Tc=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=XPcEe9FwbEXJYzWQQl8ySOSc5OTTFZqXc1og/m6nwKohPDAx4fsvAfgJToULDHlAn
 5tP18r5rtj8uK238UMIuaKKJ3KSj10DvyzzhIkXGkg+zEAq1dUl16W9Ywnnz8WplVs
 cgCxZFubHW7ybp4inOEOzqk8qFcKdMt1MPqBWXYw=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([212.95.5.3]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MdvmO-1l2Xpm0r70-00b11x; Mon, 03
 May 2021 14:02:16 +0200
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
To: Gregory Heytings <gregory@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN> <a4dfe72ae246509f876b@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <242e45b6-6dee-c85a-2ac8-67b2adeb93b5@HIDDEN>
Date: Mon, 3 May 2021 14:02:13 +0200
MIME-Version: 1.0
In-Reply-To: <a4dfe72ae246509f876b@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:8448Y9vDvAiCGovCUS64qNt28NqXT68QY14e2SNlKiDxuq1dcku
 pvayO5V5mU0A8+7tEryumQT5f/vvFGY1PiR9Jgxhz1QecSzze3CM2ZOvoj20bRlEnbyz2UB
 AwmEvifDwH1lv2SYtRXBHi4v8u6Ctw+oaGa1eLtDmeW1ocwEAyD0MOa0ZbHMU9OCVA8J8Ph
 SY4WSey00iGj39hLoLKyA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:rWAhD4fQw3I=:2l80V/oegai1rTQ01/r6F3
 UMtkdGtQGKml9d46PB6wDzzWvi+YnmrXZouYybQH0Ghi+TZLqahgqMWwngUVWYDrLjqXfGcC8
 J/BKXchvXk4pEGv2xOE/P4ukYQ+mHWOkbShi+jaaolpOZT0HARlYCzjxfb9iFIZfa3vzj5H20
 R+vJTW3SSRXIfk9lhkZ3FSc605gOAsUn1iVkVNRcNSf61MZIBkS95hVcd0I+YkatBwZPM6qmH
 SU4ArDyZ91AqD2eyes4hwZFJHy0ci24FGbW3JHnG4RFUTZT2Ob2OWEh82rYI3t/p1OW7gm0eu
 XvO9H8bQFiYQoDm5brr3HFUtKoA+dBPb9ySSvc2iVtkDFm/fEsYdzABdGLvRSD4WqqYG9IxRT
 JzzP4USK4Vc17I6jfVlpeY+HA4txPuM171iabwjYMSdWD394F51rxRzmTvQALSKEzWcNf+50F
 Wywbaa/EG20YjIphjldvCX9I0GIgrs1P+oNnnUu+yJkwJAgSmB3Pa7JXuB9j/KJOA6/+AmbR0
 xjWXa6p6GU4P6oZCUGjlS+2SCfWZLNtXxZFz/VVGY/soedKTpqNLSPBvxSZQxwBKmC7XVfL9m
 F+5sSs4KeX8XWzF4z8ARGLBCBLqof3986ixUoYUy4ki+EZ7EK+Od9+Xak7JA0xK9EwGemSSyE
 ylf4BVtHkEmgzh1lTrSQvowX4zN0+/dkSGIVW/ocN7mLQGJ6EOcaekGAbt0mXSu27/sNTAJY8
 t41bIN+vGBoWUteTjSph5cgvISDMUp0DhcGna/AXzdkPCMcBcFrh2gAtDeLo9hBab8j4o602P
 5bXbdBzc2S3b+ymXmcV5u2YbqazPNaA3L9Gnj00db/1nJNjzoelCV3yDsWEfFYHTnC4tnKamR
 PnsD1hDR6kxa+qWfhH1M49r+6Q/KF4JtBZfEQ8TiXDviRVP7NIAOCJ1Y/yhkUJ37Tang73INc
 tw7uq8scEaoYyXlOqVtLSHPHpVxsRBNq/Jwlx/sPu03+IpfAIxXZx4Vz+7YpzYhSB0v60WxOM
 CVqy3twDVMhH21d+GG11FuRdeLp8f/PHUJPqraqsTo7+UdvEBf0mikYO+H3URnNNVlQ53l74Z
 Ey5QhrX5DJbcNyD9a7wUG2AAUyY+Lun/DzUXnoN7eoCOmMnIVQ6FCEGoK1/AJKMdC2dJsWYMP
 Q1HJSzyCymBTF/1MmsOAxVYmoLoDofR8JTWmoTXPOEac2jdk+gFKxKGij9DFWakBZoFkc=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47969
Cc: Robert Marshall <robert@HIDDEN>, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > Okay, I bisected this, and the culprit is commit 3fdd3bb56c. Interestingly, that commit removed the following from handle-select-window:
 >
 > ;; Don't switch if we're currently in the minibuffer.
 > ;; This tries to work around problems where the
 > ;; minibuffer gets unselected unexpectedly, and where
 > ;; you then have to move your mouse all the way down to
 > ;; the minibuffer to select it.
 > (window-minibuffer-p)
 >
 > which happens to be what my patch adds again.

I can't give a reasonable explanation why I removed that back then, so
please re-add it as soon as your paperwork is done.

And many thanks for the bisection, great work as usual.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 11:54:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 07:54:52 2021
Received: from localhost ([127.0.0.1]:46372 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldXA3-0003Zl-Tb
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 07:54:52 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39244)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ldXA2-0003Zf-Gq
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 07:54:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51177)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ldX9w-0003Jc-Dj; Mon, 03 May 2021 07:54:44 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4408
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ldX9s-0006HK-Nd; Mon, 03 May 2021 07:54:42 -0400
Date: Mon, 03 May 2021 14:54:24 +0300
Message-Id: <83a6pc6nin.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87r1iochi1.fsf@HIDDEN> (message from Lars Ingebrigtsen on Mon, 
 03 May 2021 11:07:50 +0200)
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN>
 <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN> <83k0oh8wph.fsf@HIDDEN>
 <87r1iochi1.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47969
Cc: gregory@HIDDEN, 47969 <at> debbugs.gnu.org, robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: Gregory Heytings <gregory@HIDDEN>,  robert@HIDDEN,
>   47969 <at> debbugs.gnu.org
> Date: Mon, 03 May 2021 11:07:50 +0200
> 
> > FWIW, I think we should instead temporarily disable
> > mouse-autoselect-window when a minibuffer is active.
> 
> I don't think that's what's happening here, exactly.  If you `M-x' then
> moving the mouse to a different window doesn't have any effect that I
> can see.

That's because M-x isn't a prefix key, whereas ESC is.

> It's only in the test case described by Gregory that things go haywire:
> `ESC' + mouse move + `xfoo'.

Here's a demo without ESC:

  M-x set-variable RET mouse-autoselect-window RET t RET
  C-x 2
  C-x ; wait for the "C-x" prompt in the echo area
      ; move mouse to the other window
  b   ; selected-window is not longer the mini-window
  foo ; this gets inserted into some buffer instead of the minibuffer




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 11:19:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 07:19:30 2021
Received: from localhost ([127.0.0.1]:46347 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldWbq-00015H-My
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 07:19:30 -0400
Received: from heytings.org ([95.142.160.155]:35498)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldWbn-000151-SV
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 07:19:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620040766;
 bh=PJnWlexvRIKdEzvuk9zKwD/oLasiHYckEyiZG/QjqCY=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=Om6r1wCdLpaFzlkKk1degx6jnG5tG0eW4tfQIuv7JPhhlkvNzRq5NlC8B9vvagLdM
 6THpLxLc2/zHkJznJlVpjYhpGLbI5PbFC/NLEqE4RM1JJsywworACwm8/T18TSsrIV
 W2EhMtvivexMU+2+N9J/ZaXxJyFEfbnmM5uRHmWeOxlTCWX8jYSnnE75W/BnlzIrRn
 dv9G/PxRdeJc2XrX1S69uTpx0yZT0vs6W75wOG2qZMJYBNFYP9D5/ms5ZhgvDWQ2xp
 Fuci6nc97fbn+umfggIGPFzbxP3XMmiSlTv1+6w6BIvELgIYsuXE+XXCZbDs3jaiqA
 idNT133+TJDUw==
Date: Mon, 03 May 2021 11:19:26 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <a4dfe72ae28371c59f49@HIDDEN>
Message-ID: <a4dfe72ae246509f876b@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
 <a4dfe72ae28371c59f49@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: Robert Marshall <robert@HIDDEN>, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>>> I don't know.  What I do know is that mouse-autoselect-window was 
>>> introduced in Emacs 22, and that in Emacs 22-25 the lower window was 
>>> not selected with that recipe.  That behavior changed in Emacs 26.
>> 
>> Do you know which commit changed it?
>
> I'll try to find that.
>

Okay, I bisected this, and the culprit is commit 3fdd3bb56c. 
Interestingly, that commit removed the following from 
handle-select-window:

;; Don't switch if we're currently in the minibuffer.
;; This tries to work around problems where the
;; minibuffer gets unselected unexpectedly, and where
;; you then have to move your mouse all the way down to
;; the minibuffer to select it.
(window-minibuffer-p)

which happens to be what my patch adds again.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 09:41:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 05:41:12 2021
Received: from localhost ([127.0.0.1]:46242 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldV4i-0001pf-Iu
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 05:41:12 -0400
Received: from heytings.org ([95.142.160.155]:35374)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldV4d-0001pX-Cu
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 05:41:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620034865;
 bh=DmJrHGXnh8r8MdHyeSAFTw7talVviw4egK9+YM3M788=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=a9f6WcMW/be+lG0PyJbR774bFfh2ZRW4THveXf9lzSCxXlsPOtNyDoWoNcPy5Z1NW
 +IgMJF6vrqF3AxNQ/T/1fzZCp/LeLC5evRUOtln9lZvRyDA+YAOh/qShYxyO11GB68
 N93W41PPrrwmlMhdtHJTDfg5em8+V4E1ls42SZd8pxxmydDLivMyqn835i+AC38aG5
 aeLFcVLU3DgflU1a5ec59gjQ7XSOuxyu7pKZ5EBHFs/nyRBcAlTOC9jImMNwVAFEQp
 wohknHK8U92xKoA31ffodfvUtU52/crZRUgCx/6LezYLyF8ij4OdE6Fj8LHLotibWi
 EySJvPFeItr4w==
Date: Mon, 03 May 2021 09:41:05 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
Message-ID: <a4dfe72ae28371c59f49@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
 <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: Robert Marshall <robert@HIDDEN>, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> I don't know.  What I do know is that mouse-autoselect-window was 
>> introduced in Emacs 22, and that in Emacs 22-25 the lower window was 
>> not selected with that recipe.  That behavior changed in Emacs 26.
>
> Do you know which commit changed it?
>

I'll try to find that.

>
> In either case don't let me distract you and feel free to install any 
> fix you consider reasonable.
>

I don't have write access to the trunk, and my paperwork is not even 
finished yet :(




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 09:39:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 05:39:05 2021
Received: from localhost ([127.0.0.1]:46238 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldV2f-0001oO-6U
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 05:39:05 -0400
Received: from mout.gmx.net ([212.227.17.20]:60621)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1ldV2b-0001o1-Hb
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 05:39:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1620034732;
 bh=HDPboRDlPjiyNMsOHEFL4j1xbcVMuzPNLikJ6r6tc1g=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=TLtVzM5Tti++txXivXbZu+/9oRoIBzLJnG3osGx/eKNoPrdkawnGrnJLqhGwDzaep
 6548yieY/c81ISMh6A0Jp2jqhKU0VxEzWgAsT9deFkNvlpAtz9PFrOJ4Tp+q8Nq0oS
 mH4k742FKZLRwrR2KgbxuBgNcG6Yhs3SkyGifB94=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([212.95.5.3]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M4axq-1lbqby1LiI-001mFp; Mon, 03
 May 2021 11:38:52 +0200
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
To: Gregory Heytings <gregory@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
 <a4dfe72ae230af3059af@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <8fdeca1f-7d34-c95a-0f2d-5550dea34512@HIDDEN>
Date: Mon, 3 May 2021 11:38:50 +0200
MIME-Version: 1.0
In-Reply-To: <a4dfe72ae230af3059af@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:J66L/+dKP8uNe9m9ukkZH6jClGGU10c2leVFMYPivKImFr4i8xd
 DKUGJkni+yMGyf0NVEYUXE2V1Rt5c1Du/nqmlR9yvXxj89kEusSxIcvw1hL25CCJL7+ClHq
 Qu8sYLLQWtHQSPJvoAo2n43++UwbQT8KOlLbzxy/Q75qu4BB1gFCsv95fuYNMi02pIr9lDN
 qIeOB6TdY3Wib9Jq6FIEw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:cVxKvbGjiwQ=:7wTA+pc0lsLq0F4tQhr/32
 Xj2YF8/zAaPvIaoFDF62IJmXrwI45+bQ63eCaJkRMTvJQm1IRoHUGlL0hxgp2v73sjzbP/qkh
 458aMwgM6pJ5c4zX6yXd6eiG2aZmWPVwDlu1y6E3JkAKYeXtQmk26MmllE+flYmyIJ3DIhyEL
 zvAxiGolXXZB57qAr0dN/CVEM5ZDc0Y4CJgonxbOVCZHTLYkY2AYAVuG9jW5ceESR98r6Fby3
 lWgs/2YpLOmR9gWHCSX1A5gLVD90kPaTntVYq4PPn3Jvu7Vazj1pZsXT2NThFNnVBUWkZ/Bct
 cUhIrAY8XlDKQdITk/Aux0/0MI3C3VTYDQQx+C4ba/EZ1LYkh5WCozfGAP4Cp+RylF1jUqdS0
 MBZpaY8OMUXHTI97NImRCJNzvGSqkd246LYdRZ9TwEujFCIPvvW26U6aIor678CKA8utpTgdm
 6bDbvrKbY6iVe+v0ZVgOuGMWaj7eiN0lskbtJcRKogGKdfI6srETMSM+P7rjmXKUKE3cJmgS9
 v2bbyMmP4IMZFWhRy4okN6m0IWmnC8+5qZohq2SxmNL+IHbzHbfD48qCRqtpabl3nH9BuOJJo
 vEObuLnfQ/adI5KmxjH4bQ98UFlnmUuIAsp8s9XIXuCiVtWqCJRU3dzIOk0UGXZgvVU/ITHIO
 nBWriCuxgFa1ffE8sXMoeR4fYo5xNGjjHe/A5fvGuWQ4r9tuAxwPD6MwHDHm3JS/0I+xObFny
 GmKV+AO1SynugGUG/Li4rFL/GcjOizr98Broa3lGREwyNeRsXCxIP6bMfAMoPsw9KnF33rtYh
 5jREdOw0UuuB+SvTDU4m10RjL2M1ntgDM9mzPKahhgRXESif3mE4PZcXd8VIx08U9+MQOdvXb
 qxAwb/F4MulNkw6Oy1WnNbpZAbvkHG45SE4Clc7d8frGozh+Ot9LCNxdCMAqhrcOfVqLJPqWf
 QkBcdoFORGLV35Z4xnGhK9GoUDxm+uf/xpOxYaYOLtwpXMZka1dF2zxHpUzM35w/fNl5I2/9m
 Vo1JWV+qgEgc2Q7CQAUcmKqAvhr48PGiOnHD1+cnuKft4hIEkeyxkCumtaTlLuXDfwIwF6eAe
 ZJf/D/nMNGYygY/3Pr4kmFWVednpkhJhTSJ3RLofa06NYDPgOSULXV66DvcMMb3rC9CRswHvB
 rPGerkBTwJnCrwxKHuQ0hVFLDuF3PUFD8LYDCtNhEoMBoE8MrzDPz5ve+/msDi0aZmIv0=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47969
Cc: Robert Marshall <robert@HIDDEN>, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> 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
 >>
 >
 > Are you sure?  I tried this recipe on GNU/Linux (27.2 and 28), macOS (27.2) and Windows (27.2), and in all cases "gnus" was typed in that window.  Note that the recipe uses ESC x, not M-x.

I apparently have to move the mouse before doing the ESC.  Then I can
reproduce it.  With an occasional select-window echo in between.

 >> (2) I'd rather consider it a bug to _not_ select the lower window in that case.
 >>
 >
 > I don't know.  What I do know is that mouse-autoselect-window was introduced in Emacs 22, and that in Emacs 22-25 the lower window was not selected with that recipe.  That behavior changed in Emacs 26.

Do you know which commit changed it?

 >> 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.
 >>
 >
 > This is not the case, not even in Emacs 28.  If it were the case, the "ESC" would be discarded and "xgnus" would be typed in the lower window. What happens is that "x" becomes "M-x" because of the earlier "ESC", "M-x" stays in the minibuffer, and "gnus" in typed in the buffer.

Hmm.... ESC <mouse-1> is undefined.  That makes the difference.

In either case don't let me distract you and feel free to install any
fix you consider reasonable.

Thanks, martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 09:08:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 05:08:01 2021
Received: from localhost ([127.0.0.1]:46214 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldUYb-0001X6-FY
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 05:08:01 -0400
Received: from quimby.gnus.org ([95.216.78.240]:39594)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1ldUYZ-0001Wt-Pg
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 05:08:00 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=/syhYlmgrr2bJbQnPE6XzlDqG0jBlr/ZY03zfeYsfsg=; b=MGivpm7AqqllepYOTXpmKEEcjL
 zi8hTWrlkVQztsXgn7AjU/OaDReYO2G9C2otJHFA4n3XLvB7vt5EqzF11Ar8pYxjK2HACwxWfSu6N
 4FUcaslyy2mf3afudeUNMdNVGr7uHJalnc74KiLUeXhzwYRNoGzVFqxnMDGlFQbWkjhc=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1ldUYQ-0002re-H3; Mon, 03 May 2021 11:07:53 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN>
 <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN> <83k0oh8wph.fsf@HIDDEN>
X-Now-Playing: The Style Council's _The Complete Adventures (1)_: "My Ever
 Changing Moods"
Date: Mon, 03 May 2021 11:07:50 +0200
In-Reply-To: <83k0oh8wph.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 02 May
 2021 09:40:42 +0300")
Message-ID: <87r1iochi1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Eli Zaretskii <eliz@HIDDEN> writes: >> Cc'ing Martin, who
 authored most of the handle-select-window function. >> The recipe is upthread.
 > > FWIW,
 I think we should instead temporarily disable > mouse-autoselect-window
 when a minibuffer [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: Gregory Heytings <gregory@HIDDEN>, 47969 <at> debbugs.gnu.org,
 robert@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Cc'ing Martin, who authored most of the handle-select-window function. 
>> The recipe is upthread.
>
> FWIW, I think we should instead temporarily disable
> mouse-autoselect-window when a minibuffer is active.

I don't think that's what's happening here, exactly.  If you `M-x' then
moving the mouse to a different window doesn't have any effect that I
can see.

It's only in the test case described by Gregory that things go haywire:
`ESC' + mouse move + `xfoo'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 3 May 2021 08:42:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 04:42:31 2021
Received: from localhost ([127.0.0.1]:46185 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldU9v-0005Pt-4N
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 04:42:31 -0400
Received: from heytings.org ([95.142.160.155]:35290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldU9t-0005Pn-B1
 for 47969 <at> debbugs.gnu.org; Mon, 03 May 2021 04:42:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620031348;
 bh=lLEDGo4QW8KAvwN7nrVTmNDjNubv0qVv6SH5kEIMOmU=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=OMhtBiuf0rfhO0LPrIqsBEFb5IupFoNR1KGPydyJBT5g10CaX3kG/4poX/2q96utU
 L5aIKqUhfGX1MjayrOiY1FySRV5PPY7jq5v/iV21pWXYQ5YQoO5OW5uHvXv8jHBudc
 TiHm8bDplnVm7bv2MTgZkfr/ARl8N7VniKwZawntDJ5Aiij68oEFBIZHI2k683/qIa
 M3JOlE7Zmtq1+aN68HkB2SeLF7vymw0+nTXY8trmqW+ggeyUn4sekaSt4fpXrltV04
 a2BlEHXQ5euBpxSGujsnXsa3RnNM+MMYOi29dmEYvaTZ4KTtNvbVsZz78dKUy/iIWs
 4F7nlTD4Z7OUA==
Date: Mon, 03 May 2021 08:42:28 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
Message-ID: <a4dfe72ae230af3059af@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: Robert Marshall <robert@HIDDEN>, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


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

Are you sure?  I tried this recipe on GNU/Linux (27.2 and 28), macOS 
(27.2) and Windows (27.2), and in all cases "gnus" was typed in that 
window.  Note that the recipe uses ESC x, not M-x.

>
> (2) I'd rather consider it a bug to _not_ select the lower window in 
> that case.
>

I don't know.  What I do know is that mouse-autoselect-window was 
introduced in Emacs 22, and that in Emacs 22-25 the lower window was not 
selected with that recipe.  That behavior changed in Emacs 26.

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

This is not the case, not even in Emacs 28.  If it were the case, the 
"ESC" would be discarded and "xgnus" would be typed in the lower window. 
What happens is that "x" becomes "M-x" because of the earlier "ESC", "M-x" 
stays in the minibuffer, and "gnus" in typed in the buffer.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 2 May 2021 08:02:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 02 04:02:05 2021
Received: from localhost ([127.0.0.1]:41333 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ld73F-0005SV-GK
	for submit <at> debbugs.gnu.org; Sun, 02 May 2021 04:02:05 -0400
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 <robert@HIDDEN>) id 1ld73E-0005MX-5G
 for 47969 <at> debbugs.gnu.org; Sun, 02 May 2021 04:02:04 -0400
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-Authenticated-User: 
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
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)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <24718.23668.709410.692688@HIDDEN>
Date: Sun, 2 May 2021 09:01:56 +0100
From: Robert Marshall <robert@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN>
 <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
 <4edb1435266ad41487a5@HIDDEN>
 <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
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-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: Gregory Heytings <gregory@HIDDEN>, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 2 May 2021 07:40:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 02 03:40:08 2021
Received: from localhost ([127.0.0.1]:41218 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ld6i0-0001KW-Aa
	for submit <at> debbugs.gnu.org; Sun, 02 May 2021 03:40:08 -0400
Received: from mout.gmx.net ([212.227.17.20]:56851)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1ld6hy-0001Jo-12
 for 47969 <at> debbugs.gnu.org; Sun, 02 May 2021 03:40:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1619941197;
 bh=18SBSk5XvcNDjCcD/mDVJAJABJfqAeFD+dlShLUi1pE=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=is1av6lgfuVEKnd768Jcm5uHqcgkZ/rjwrWPh9lfhh9mvM6ngshjokGBq+9x0ZN3H
 lX5naxYjlIhIkZjqMX7J7QUbDA3N2cBCW4njETl5RFzdXiNKI7UU4ZbnL94dc0/IEj
 SnQZq5ATGmagDldr/GCwFSFsjC7HNfgXMUeOegp0=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([212.95.5.190]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MSc1B-1m1YNo22tV-00Stjm; Sun, 02
 May 2021 09:39:57 +0200
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
To: Gregory Heytings <gregory@HIDDEN>,
 Robert Marshall <robert@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <d999b181-9ef7-d76e-e1d9-5152d7ac1800@HIDDEN>
Date: Sun, 2 May 2021 09:39:55 +0200
MIME-Version: 1.0
In-Reply-To: <4edb1435266ad41487a5@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:UkwVlhXSeLMLnDmyV2XvgjrP4hjS0Qd9Ul59ZzIqwyrBrf0bRWc
 +0CwUAdKO+hCd9bAMpf6yZUM2jSbsFEbN8BbLcOXx3jwdkNLrKv9E0Na6EUqH4ZTzi16NYq
 lsVev5hkJKS1frHcSvcOG/VMV5gzZNH4ZdFs++/HhlpLQpuz5xI9jtHspU8VcnwAno45nTU
 ym71DsXRYKQutfJyRqNIw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:lrmg8ytL3OQ=:yybU71bBXVqP5ZtpS62LX+
 o/tmsYiuY1g+mtVNvJIKaiEs3n2mg2KCwc93d6a7S2b1FU7ZnJRy+UuXYSTgJIK7CvWNKehfa
 aiy7vdXM+jXGhLe+ihy9Q4nrLRqS04jl/05fOOPCfBWtTcDrsG9jPcMwm0hKtJKcUj2I5c4a/
 ur0Tdq2Psg7SphEHwF6gt7xtnyPcdlGyt4/dANwSvzI6vckJpGTNj9t6yF+KWe85HKPlPWa9p
 TQnk99QMC6qlCzjejSqhXmsHQQNU5ehWLdoeJZnyj+tDk5bWoOaZ2qb4uVkiEfYGBZpLya6xH
 VWEVsSoqoOVLgiO4YEOeGDvSNDRyQCoExVnbPQbON1mK7YiJxIGxetmEV/zrCsySS4KbZC6Oh
 c2IBcaadPjL/duCpzapL5DVctfAzofKZlgTBU8D1xxSzyZ2QtLzVfIS9pJ7Stf6DCunSq0DE2
 czzv1dep/di6pt2glD15xDgZrQjWFRmB/93vz1DvQEbrRpUiNHn2UvZFZ5/y4sXRW1XGPOIBe
 ndXtSyrH/FOsHy8C1SmIt4zvL0By7bjKkUNTihdmp7WJyR+L4AdSCyu24on+uN9F2l2envSSr
 xr6ivMSR/5sVaSmWq1kp9LOimhQeJbNkRwpAbXjNyljoYJ+kRX/2OZBY0PzR2DZHGSkh7wgM7
 plyLF4F01N26HeXboPKtN31St217DhgTnIdSz8EreQwqGcGubssHygPcyXkZilUjOt9e+Mr/k
 RMVGOW6hb31AFL1XVxNtUHGGu9jGW8lVDv6DcyxbENK0pe6hPTbTQj6ydbfHbiFKax64uRHFQ
 70qQO2u+1o0poyq8B/G0eUQq+DVlKREo/R2Np7VpZKKhre3gqXISRlZ1PBS5cUlC8nGL/QSlm
 xoCzfCLIHvVK3MhUInOeSQPIwbfKK4d/wWMwdfNBTFTofryryqlGds7SzfT/yfOzXhpMUcZET
 w8W24H66S2QTgh/RWxYq69qx8SVxfa6/NUbluBZhNMXASNxpkfQiYttKfTXASkK/447ND3czE
 Q273q2fV7uCCRfva6quSl6iR0SGJsd9irKP1B1T4bth9XKvXIj2JAzPPCNZNz9QBAQKWoV0Eh
 6L/j4LMceZoRDNqHF1HKvFiyjubxmUbA3stCziQ7IQMg8cUKFAxNBn+dHviKIEVpEZmey2215
 O87XV8sAn8OgtBDoj6mIJSaqwoMxrmxOehRGYgg9kJyGZm1Nz3CF5ROWGUo+oBKvQIcw4=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47969
Cc: 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

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

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.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 2 May 2021 06:41:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 02 02:41:09 2021
Received: from localhost ([127.0.0.1]:40757 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ld5mv-0002Tj-EP
	for submit <at> debbugs.gnu.org; Sun, 02 May 2021 02:41:09 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40308)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ld5mt-0002Tb-9v
 for 47969 <at> debbugs.gnu.org; Sun, 02 May 2021 02:41:08 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56903)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ld5mn-0000XZ-M5; Sun, 02 May 2021 02:41:01 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4133
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ld5mn-00039f-1C; Sun, 02 May 2021 02:41:01 -0400
Date: Sun, 02 May 2021 09:40:42 +0300
Message-Id: <83k0oh8wph.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
In-Reply-To: <4edb1435266ad41487a5@HIDDEN> (message from Gregory
 Heytings on Sat, 01 May 2021 20:20:16 +0000)
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN> <4edb1435266ad41487a5@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47969
Cc: robert@HIDDEN, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 01 May 2021 20:20:16 +0000
> From: Gregory Heytings <gregory@HIDDEN>
> Cc: 47969 <at> debbugs.gnu.org
> 
> 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.

FWIW, I think we should instead temporarily disable
mouse-autoselect-window when a minibuffer is active.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 1 May 2021 20:20:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 01 16:20:20 2021
Received: from localhost ([127.0.0.1]:38197 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lcw68-0005By-2v
	for submit <at> debbugs.gnu.org; Sat, 01 May 2021 16:20:20 -0400
Received: from heytings.org ([95.142.160.155]:33326)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1lcw65-0005Bq-Uy
 for 47969 <at> debbugs.gnu.org; Sat, 01 May 2021 16:20:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1619900416;
 bh=T6zeqz2wV/Ms0CneO1NH4sTgCafZGVEvf2lcGUKlDRc=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=SSMU8Va5M2S+U0wRENcKb99HukoHPNPC5jVTFv5gxUuiAhmOfhExv6mtnzBqi9aDU
 sxjtc62qmwcBj7v/vwd/JsrrzdmxJ6Yt1DScZOysRraRUG4aKwDjJl16IztY5mclzP
 9uV90jI1817G8X3i22+ubZ52kMYVVveifHm1laf2SW6YYt6RyZN6dxU5d2fXQoooeJ
 WhW8d1t0uuhNEp/nnA70vF3k7tqwj115dxj2WqtcTnySVxYyPlZEJbrK3dNQYly9SW
 7zWqNDFQF9GB5yx2urvhf7krzF7VQoYavkb8O6oDHz3knlwZXaubQahyld7s7O681/
 BYQaNNgeR1Zwg==
Date: Sat, 01 May 2021 20:20:16 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Robert Marshall <robert@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <677a04021b6d6347bbd2@HIDDEN>
Message-ID: <4edb1435266ad41487a5@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
 <677a04021b6d6347bbd2@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="45asGlyz1D"
Content-ID: <4edb143526f9a5fb1b08@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: martin rudalics <rudalics@HIDDEN>, 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--45asGlyz1D
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-ID: <4edb14352693b872c876@HIDDEN>


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.
--45asGlyz1D
Content-Type: text/x-diff; name=Do-not-switch-to-other-window-when-minibuffer-is-sel.patch; charset=us-ascii
Content-Transfer-Encoding: base64
Content-ID: <4edb143526f95c64d716@HIDDEN>
Content-Description: 
Content-Disposition: attachment; filename=Do-not-switch-to-other-window-when-minibuffer-is-sel.patch

RnJvbSBjZmM4NWNhMGYxNmIxOTQzNjdlY2ZiMTk1YTIzN2I5NTVmODEwODhi
IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0
aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBTYXQsIDEgTWF5
IDIwMjEgMjA6MTc6MzAgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gRG8gbm90
IHN3aXRjaCB0byBvdGhlciB3aW5kb3cgd2hlbiBtaW5pYnVmZmVyIGlzIHNl
bGVjdGVkDQoNCiogbGlzcC93aW5kb3cuZWwgKGhhbmRsZS1zZWxlY3Qtd2lu
ZG93KTogRG8gbm90IHNpbGVudGx5IHN3aXRjaCB0byBvdGhlcg0Kd2luZG93
IHdoZW4gbWluaWJ1ZmZlciBpcyBzZWxlY3RlZCwgd2hpY2ggY2FuIGhhcHBl
biB3aXRoDQptb3VzZS1hdXRvc2VsZWN0LXdpbmRvdyB0IChCdWcjNDc5Njkp
Lg0KLS0tDQogbGlzcC93aW5kb3cuZWwgfCAyICsrDQogMSBmaWxlIGNoYW5n
ZWQsIDIgaW5zZXJ0aW9ucygrKQ0KDQpkaWZmIC0tZ2l0IGEvbGlzcC93aW5k
b3cuZWwgYi9saXNwL3dpbmRvdy5lbA0KaW5kZXggY2Y1NzUyMTEzZC4uNzc2
MDlhNzk0YiAxMDA2NDQNCi0tLSBhL2xpc3Avd2luZG93LmVsDQorKysgYi9s
aXNwL3dpbmRvdy5lbA0KQEAgLTEwMDQ4LDYgKzEwMDQ4LDggQEAgaGFuZGxl
LXNlbGVjdC13aW5kb3cNCiAgICAgICAgICAgICAgICAgOzsgYWxyZWFkeSBz
ZWxlY3RlZC4NCiAgICAgICAgICAgICAgICAgKGFuZCAobm90IChlcSBmcmFt
ZSAoc2VsZWN0ZWQtZnJhbWUpKSkNCiAgICAgICAgICAgICAgICAgICAgICAo
ZnJhbWUtcGFyYW1ldGVyIGZyYW1lICduby1hY2NlcHQtZm9jdXMpKQ0KKyAg
ICAgICAgICAgICAgICA7OyBEb24ndCBzd2l0Y2ggaWYgbWluaWJ1ZmZlciB3
aW5kb3cgaXMgc2VsZWN0ZWQuDQorICAgICAgICAgICAgICAgICh3aW5kb3ct
bWluaWJ1ZmZlci1wKQ0KICAgICAgICAgICAgICAgICA7OyBEb24ndCBzd2l0
Y2ggdG8gbWluaWJ1ZmZlciB3aW5kb3cgdW5sZXNzIGl0J3MgYWN0aXZlLg0K
ICAgICAgICAgICAgICAgICAoYW5kICh3aW5kb3ctbWluaWJ1ZmZlci1wIHdp
bmRvdykNCiAgICAgICAgICAgICAgICAgICAgICAobm90IChtaW5pYnVmZmVy
LXdpbmRvdy1hY3RpdmUtcCB3aW5kb3cpKSkpDQotLSANCjIuMzAuMg0KDQo=

--45asGlyz1D--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 25 Apr 2021 12:29:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 25 08:29:39 2021
Received: from localhost ([127.0.0.1]:42191 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ladtH-0005G6-37
	for submit <at> debbugs.gnu.org; Sun, 25 Apr 2021 08:29:39 -0400
Received: from heytings.org ([95.142.160.155]:52514)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ladtA-0005Fs-Vg
 for 47969 <at> debbugs.gnu.org; Sun, 25 Apr 2021 08:29:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1619353768;
 bh=F545J0rKqY61m1OKhDGIwbjJ+pUdaZ8YPVK8RnSj9XM=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=MnWp2StP7Th4AL7Qu+SfowEeR7ZFKU6FU9SuY2m4qogupRTzxV8LwWy5sgIgNUZEi
 P0cSmxMkkHmfN2Apq/D2+wM0FzhW98bZ30ErvD4Grmb8NNJP9KDIg54nCpp3BVwGh+
 U2EqaAOxxhvJkt/kuLzBClHGUirIMQQXlswktapHpWIEuRzBNk6rJc7J3ghH9Pb2fi
 5cJ7yCVi4D7fjKNShuoNfd2ylPDug1k+/S0YPH/II+nM16oW7jMj6G6a2weXAIiGpW
 Ot+JhXzLMfmvriTecuT2Re7l4HyD0EAx2r0V/GD8ktbj0ZglWb8xDoMMo5J/EhTaNK
 l1+wj/HG/qOGg==
Date: Sun, 25 Apr 2021 12:29:27 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Robert Marshall <robert@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <24709.24669.871737.299611@HIDDEN>
Message-ID: <677a04021b6d6347bbd2@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
 <24709.24669.871737.299611@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> Could you confirm that this correctly reproduces what you see?
>
> Brilliant! Yes that's precisely what I'm seeing
>

Thanks for your confirmation, I'll investigate this issue.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 25 Apr 2021 12:28:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 25 08:28:23 2021
Received: from localhost ([127.0.0.1]:42187 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lads6-0005EG-RK
	for submit <at> debbugs.gnu.org; Sun, 25 Apr 2021 08:28:22 -0400
Received: from know-smtprelay-omc-5.server.virginmedia.net
 ([80.0.253.69]:58359) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <robert@HIDDEN>) id 1lads5-0005E2-3e
 for 47969 <at> debbugs.gnu.org; Sun, 25 Apr 2021 08:28:21 -0400
Received: from capuchin.co.uk ([82.0.180.44]) by cmsmtp with ESMTP
 id adryl0e2c52czadrylvdlx; Sun, 25 Apr 2021 13:28:14 +0100
X-Originating-IP: [82.0.180.44]
X-Authenticated-User: 
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=3YhXtTcJ-WEA:10 a=RUWy02q0btNEeZCbuzYA:9 a=CjuIK1q_8ugA:10
Received: from poulenc.faure (unknown [192.168.0.153])
 by capuchin.co.uk (Postfix) with ESMTPS id 1EDE219F375;
 Sun, 25 Apr 2021 13:28:14 +0100 (BST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <24709.24669.871737.299611@HIDDEN>
Date: Sun, 25 Apr 2021 13:28:13 +0100
From: Robert Marshall <robert@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <677a04021b23aa2d7c9f@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN>
 <24709.3891.605753.919647@HIDDEN>
 <677a04021b23aa2d7c9f@HIDDEN>
X-Mailer: VM 8.2.0b under 28.0.50 (x86_64-pc-linux-gnu)
X-CMAE-Envelope: MS4wfPrOrdZVeimcgTginFSyo9CmQP2GRPd25XqvI0qPMfNd4zyWXW9DN/Bcn1D3FVxYbkd2qHYVqR9hPVVFfmyFox/1EIh8abgtnyGNbPS/nay6xsNxW+yg
 hcbJ19cpZTaxV17zhbZrqQ1Zz476Wy2kaWXIVl13PjIjQta3Yl/TqoJ9pcRjuT/7shasY3I87FjP8J0/pvUzjIByCTxaTTlP0G8=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Gregory Heytings writes:
 > 
 > >
 > > I will attempt to - however I'm only seeing this behaviour once a week 
 > > or so, so difficult to replicate. My impression is that it used to 
 > > happen more frequently when I was running a build from git made spring 
 > > 2020, it's now less frequent but still occurring.
 > >
 > 
 > I think I managed to reproduce the issue you see:
 > 
 > emacs -Q
 > M-: (setq mouse-autoselect-window t)
 > C-x 2
 > move mouse to the upper window
 > ESC
 > move mouse to the lower window
 > xgnus
 > 
 > "x" is interpreted correctly and becomes M-x, but "gnus" is typed in the 
 > buffer in the lower window.
 > 
 > Could you confirm that this correctly reproduces what you see?
 > 
 Brilliant! Yes that's precisely what I'm seeing
 
Robert
-- 
Robert Marshall               twitter: @rajm




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 25 Apr 2021 09:58:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 25 05:58:38 2021
Received: from localhost ([127.0.0.1]:42029 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1labXC-0003Mu-EM
	for submit <at> debbugs.gnu.org; Sun, 25 Apr 2021 05:58:38 -0400
Received: from heytings.org ([95.142.160.155]:52340)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1labXB-0003Mn-33
 for 47969 <at> debbugs.gnu.org; Sun, 25 Apr 2021 05:58:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1619344716;
 bh=6ck3pSDS6F9kZqJosAqBfTmN+2/svVIODoLnZlZ7KVs=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=l22b0uoq0JTz2YW4lac7j4n/gsf4ZnGOLqLwfknh2AaLUTquhEkyFi5KldHcFtZZn
 zoMKsjMeuzK09FdUkoxZIQ6iRkshJWWpjYhHFdEMLcg3ckinUgq0OlIu37qL37CyH1
 C/cvU/lUeT0bMN53q/6SvNXsuuHpbolCxrf2Uq+12moIajtH4ixMXlehhdvGWGj9n8
 6EE2MhTY0bjbX4j8mV8RMqBL8MqBH4C4Gdiyp3Jk6c5fWN1r9e9kbNGruG8N78ao/i
 ieV6QAPDHW0Dbb2CCoIn9NlxSEga31nz7GuIYsoJmvJrA8+WPj9ZBsA3lEXYxf+MwL
 SEF6K7QvQJjQA==
Date: Sun, 25 Apr 2021 09:58:36 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Robert Marshall <robert@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <24709.3891.605753.919647@HIDDEN>
Message-ID: <677a04021b23aa2d7c9f@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN> <24709.3891.605753.919647@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> I will attempt to - however I'm only seeing this behaviour once a week 
> or so, so difficult to replicate. My impression is that it used to 
> happen more frequently when I was running a build from git made spring 
> 2020, it's now less frequent but still occurring.
>

I think I managed to reproduce the issue you see:

emacs -Q
M-: (setq mouse-autoselect-window t)
C-x 2
move mouse to the upper window
ESC
move mouse to the lower window
xgnus

"x" is interpreted correctly and becomes M-x, but "gnus" is typed in the 
buffer in the lower window.

Could you confirm that this correctly reproduces what you see?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 25 Apr 2021 06:42:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 25 02:42:08 2021
Received: from localhost ([127.0.0.1]:41893 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1laYT2-0007Bk-8Q
	for submit <at> debbugs.gnu.org; Sun, 25 Apr 2021 02:42:08 -0400
Received: from know-smtprelay-omc-5.server.virginmedia.net
 ([80.0.253.69]:59482) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <robert@HIDDEN>) id 1laYSx-0007BB-2s
 for 47969 <at> debbugs.gnu.org; Sun, 25 Apr 2021 02:42:06 -0400
Received: from capuchin.co.uk ([82.0.180.44]) by cmsmtp with ESMTP
 id aYSqlzLLj52czaYSqlvQeQ; Sun, 25 Apr 2021 07:41:56 +0100
X-Originating-IP: [82.0.180.44]
X-Authenticated-User: 
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=3YhXtTcJ-WEA:10 a=nCwyysSMVivGiSS8tTUA:9 a=CjuIK1q_8ugA:10
Received: from poulenc.faure (unknown [192.168.0.153])
 by capuchin.co.uk (Postfix) with ESMTPS id E89FF19F375;
 Sun, 25 Apr 2021 07:41:55 +0100 (BST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <24709.3891.605753.919647@HIDDEN>
Date: Sun, 25 Apr 2021 07:41:55 +0100
From: Robert Marshall <robert@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <7ee648e84004b7745946@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
 <7ee648e84004b7745946@HIDDEN>
X-Mailer: VM 8.2.0b under 28.0.50 (x86_64-pc-linux-gnu)
X-CMAE-Envelope: MS4wfFNgYF8TLpp8aq04bwR5FRhF2wIVLbyODxjcmnEnsO8yYjDWPNu8q53TI66WrQqptBppwlOWtyx+KmWNA4RPnMUeclhc9nKCj6InlSiRdqrA2iYw0FhD
 NylnpfCKLZ3K39Q6HFYKhT9t1MqplsVEagR6nEQ46WkTEaMHZQ6S62IvTlf5fZTK86qaxixdG+7s/YdPvjo+g7YcG/smRblMGcU=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Gregory Heytings writes:
 > 
 > >
 > > I've been finding - in last 12 months - that sometimes when I do M-x and 
 > > type something the cursor has moved to the main window in that frame, 
 > > and the desired command ends up in that window if it is a 'normal' 
 > > buffer or does more drastic things if (for example) in dired.
 > >
 > > from Ch l in one of these cases
 > > <escape> <select-window> x		 ;; execute-extended-command
 > > ;; handle-select-window
 > > g					 ;; revert-buffer
 > > n					 ;; dired-next-line
 > > u					 ;; dired-unmark
 > > s					 ;; dired-sort-toggle-or-edit
 > >
 > > you'll see that my intention of typing M-x gnus has been subverted and 
 > > the commands are happening in a dired buffer!
 > >
 > > I have (setq mouse-autoselect-window 1) but I don't think I'm pausing 
 > > long enough (and it doesn't see to kick in anyway from a minibuffer) 
 > > that handle-select-window is clearly the problem but not sure where it 
 > > is coming from, and it is happening very rarely so I'd prefer not to set 
 > > a break there.
 > >
 > 
 > Thanks for your bug report.  I could not reproduce what you describe alas; 
 > could you perhaps try to create a recipe, starting with emacs -Q, with 
 > which the bug you experience is triggered?
 > 

I will attempt to - however I'm only seeing this behaviour once a week
or so, so difficult to replicate. My impression is that it used to
happen more frequently when I was running a build from git made spring
2020, it's now less frequent but still occurring.

I shall steer clear of functions starting with the characters dxyes -
that way lies data loss with this bug and a dired buffer ;)

Robert
-- 
Robert Marshall               twitter: @rajm




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at 47969 <at> debbugs.gnu.org:


Received: (at 47969) by debbugs.gnu.org; 24 Apr 2021 17:29:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 24 13:29:23 2021
Received: from localhost ([127.0.0.1]:41399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1laM5r-0002kr-2l
	for submit <at> debbugs.gnu.org; Sat, 24 Apr 2021 13:29:23 -0400
Received: from heytings.org ([95.142.160.155]:51588)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1laM5m-0002kf-9K
 for 47969 <at> debbugs.gnu.org; Sat, 24 Apr 2021 13:29:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1619285356;
 bh=5+KQkCOc7PchA06qw3gfa10/d2ML4YN8SvlcjblOB0o=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=MOYTrM6zCZN7O+3wWKBOwQK58zbunj+0A9FoTiR+D2zo+xuRLrpr53MXuwWLAy8uD
 af1TIicgmiXfAz7/RrGi98Q/Xu1TOnqQyIav9HsNnsS19rpO1TsUbMvfPyyM9nXyV0
 2Vrr32Iy3c9jrYNk2EF17y0cAy/0HBZFXUh/5LdSsHgJh9M5QO/MPmG73LIfeMHVd+
 I7XL4I92cHgR88nYBV1pABGCl9lEDKLfqkUzlfrR3OlASbN3pyBOFo2Rsw2tm+7/rU
 DkoHsvUGzux0f23io1loxfdz6MIKoWmZi1zqM+xJGU0vMygAOL5Ao0IkJTlXPkWEQM
 16BdvGFIQQKSw==
Date: Sat, 24 Apr 2021 17:29:16 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Robert Marshall <robert@HIDDEN>
Subject: Re: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
In-Reply-To: <24706.50397.801563.461736@HIDDEN>
Message-ID: <7ee648e84004b7745946@HIDDEN>
References: <24706.50397.801563.461736@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47969
Cc: 47969 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> I've been finding - in last 12 months - that sometimes when I do M-x and 
> type something the cursor has moved to the main window in that frame, 
> and the desired command ends up in that window if it is a 'normal' 
> buffer or does more drastic things if (for example) in dired.
>
> from Ch l in one of these cases
> <escape> <select-window> x		 ;; execute-extended-command
> ;; handle-select-window
> g					 ;; revert-buffer
> n					 ;; dired-next-line
> u					 ;; dired-unmark
> s					 ;; dired-sort-toggle-or-edit
>
> you'll see that my intention of typing M-x gnus has been subverted and 
> the commands are happening in a dired buffer!
>
> I have (setq mouse-autoselect-window 1) but I don't think I'm pausing 
> long enough (and it doesn't see to kick in anyway from a minibuffer) 
> that handle-select-window is clearly the problem but not sure where it 
> is coming from, and it is happening very rarely so I'd prefer not to set 
> a break there.
>

Thanks for your bug report.  I could not reproduce what you describe alas; 
could you perhaps try to create a recipe, starting with emacs -Q, with 
which the bug you experience is triggered?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Apr 2021 13:00:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 23 09:00:33 2021
Received: from localhost ([127.0.0.1]:36407 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lZvQ9-0004Gw-5n
	for submit <at> debbugs.gnu.org; Fri, 23 Apr 2021 09:00:33 -0400
Received: from lists.gnu.org ([209.51.188.17]:47684)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <robert@HIDDEN>) id 1lZvQ8-0004Gp-AK
 for submit <at> debbugs.gnu.org; Fri, 23 Apr 2021 09:00:32 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57658)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <robert@HIDDEN>)
 id 1lZvQ7-00059i-Vn
 for bug-gnu-emacs@HIDDEN; Fri, 23 Apr 2021 09:00:32 -0400
Received: from know-smtprelay-omc-5.server.virginmedia.net
 ([80.0.253.69]:53448)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <robert@HIDDEN>)
 id 1lZvQ3-00086i-HL
 for bug-gnu-emacs@HIDDEN; Fri, 23 Apr 2021 09:00:31 -0400
Received: from capuchin.co.uk ([82.0.180.44]) by cmsmtp with ESMTP
 id ZvPtlpagF52czZvPtlu82e; Fri, 23 Apr 2021 14:00:17 +0100
X-Originating-IP: [82.0.180.44]
X-Authenticated-User: 
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=3YhXtTcJ-WEA:10 a=aR16PxjQAAAA:8 a=Gezk92GOy8B0H7chPXMA:9
 a=CjuIK1q_8ugA:10 a=zbFvvTOBjyH4ze5LlUjX:22
Received: from poulenc.faure (unknown [192.168.0.153])
 by capuchin.co.uk (Postfix) with ESMTPS id 4D25319F349
 for <bug-gnu-emacs@HIDDEN>; Fri, 23 Apr 2021 14:00:17 +0100 (BST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <24706.50397.801563.461736@HIDDEN>
Date: Fri, 23 Apr 2021 14:00:13 +0100
From: Robert Marshall <robert@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; Losing minibuffer focus in trying M-x command
X-Mailer: VM 8.2.0b under 28.0.50 (x86_64-pc-linux-gnu)
X-CMAE-Envelope: MS4wfEOfYPmNa02tP2mX/poNd/1jAhd35+YXpB9x0ACIDinYVz3Bo3+CcOKzfRNgnLkf3hNo7bUZ7t4GTRx8LLHsMI8XhFo1zJOMrMI1gpcFLWQnXKVVJE7g
 UBdA3fshmeYlkCapa7GaVS7Eqqb8ISqiiJqIdZ14yoob8c4eh0MuMVcJ
Received-SPF: none client-ip=80.0.253.69; envelope-from=robert@HIDDEN;
 helo=know-smtprelay-omc-5.server.virginmedia.net
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001,
 RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

I've been finding - in last 12 months - that sometimes when I do M-x
and type something the cursor has moved to the main window in that
frame, and the desired command ends up in that window if it is a
'normal' buffer or does more drastic things if (for example) in dired.

from Ch l in one of these cases
 <escape> <select-window> x		 ;; execute-extended-command
 ;; handle-select-window
 g					 ;; revert-buffer
 n					 ;; dired-next-line
 u					 ;; dired-unmark
 s					 ;; dired-sort-toggle-or-edit

you'll see that my intention of typing M-x gnus has been subverted and
the commands are happening in a dired buffer!

I have (setq mouse-autoselect-window 1) but I don't think I'm pausing
long enough (and it doesn't see to kick in anyway from a minibuffer)
that handle-select-window is clearly the problem but not sure where it
is coming from, and it is happening very rarely so I'd prefer not to
set a break there.

(plasma desktop environment - in case that's relevant)

Robert

In GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
 of 2021-04-15 built on poulenc
Repository revision: 3b84f8f47c1e2ad2842e3f5ce38823d3083ad12a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Ubuntu 20.10

Configured using:
 'configure --with-xpm=ifavailable'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LCMS2
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3
ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Help

Minor modes in effect:
  which-function-mode: t
  shell-dirtrack-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  desktop-save-mode: t
  recentf-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/robert/elisp/dired-async hides /home/robert/.emacs.d/elpa/async-20191030.2138/dired-async
/home/robert/elisp/async hides /home/robert/.emacs.d/elpa/async-20191030.2138/async

Features:
(shadow emacsbug vm-digest cal-move vm-mark gnus-fun imgur log-view
pcvs-util shortdoc help-fns radix-tree smerge-mode diff dabbrev tabify
man url-cache pp gnutls smtpmail shr-color find-dired grep canlock
bbdb-message footnote rx sort smiley gnus-cite flow-fill mm-archive
mail-extr gnus-bcklg gnus-async qp gnus-ml disp-table gnus-topic
cursor-sensor nndraft nnmh nnfolder gnus-agent gnus-srvr gnus-score
nnvirtual gnus-msg gnus-cache bbdb-gnus network-stream nntp sendmail
bbdb-vm bbdb-mua bbdb-com crm bbdb bbdb-site timezone vm-pine vm-edit
vm-rfaddons vm-reply vm-imap vm-save vm-virtual vm-summary-faces
vm-delete vm-pop vm-undo vm-sort vm-thread vm-mime vm-toolbar vm-menu
tapestry vm-window vm-folder vm-crypto vm-summary vm-mouse vm-page
vm-motion vm-minibuf vm-message vm-misc vm-macro vm-autoloads vm-vars
vm-version vm misearch multi-isearch dcl-mode tempo tramp-archive
tramp-gvfs tramp-cache zeroconf perl-mode score-mode conf-mode view
python tramp-sh tramp tramp-loaddefs trampver tramp-integration
files-x tramp-compat ls-lisp rng-xsd xsd-regexp rng-cmpct rng-nxml
rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt
rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util
nxml-enc xmltok arc-mode archive-mode vc-bzr eimp vc-dir ewoc vc
mule-util markdown-mode make-mode org-element avl-tree generator
ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search
eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view
mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus
dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec
gnus-int gnus-range message rfc822 mml mml-sec epa derived epg
epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader gnus-win ol-docview doc-view jka-compr image-mode exif
ol-bibtex bibtex ol-bbdb ol-w3m org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete
org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat
org-macs org-loaddefs format-spec find-func add-log which-func vc-cvs
flyspell ispell tex-mode compile shell pcomplete comint ansi-color
ring cl-extra help-mode mhtml-mode css-mode eww xdg url-queue
thingatpt shr kinsoku svg mm-url gnus nnheader gnus-util rmail
rmail-loaddefs text-property-search mail-utils color js imenu cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs sgml-mode facemenu dom vc-git diff-mode easy-mmode
vc-dispatcher bug-reference reveal sh-script smie executable dired-aux
dired-x dired dired-loaddefs twittering-mode advice identica-mode
url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr url-gw nsm rmc puny longlines parse-time iso8601
time-date xml cl cal-china lunar solar cal-dst cal-bahai cal-islam
cal-hebrew holidays hol-loaddefs diary-lib diary-loaddefs cal-menu
calendar cal-loaddefs server tbemail org-install hi-lock edmacro
kmacro desktop frameset recentf tree-widget wid-edit paren
bbdb-loaddefs finder-inf info package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs
cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese composite
charscript charprop case-table epa-hook jka-cmpr-hook help simple
abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face
macroexp files window text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 2462049 258618)
 (symbols 48 109522 26)
 (strings 32 717647 33266)
 (string-bytes 1 19958259)
 (vectors 16 292703)
 (vector-slots 8 4204652 233649)
 (floats 8 1278 963)
 (intervals 56 245326 77)
 (buffers 992 703))




Acknowledgement sent to Robert Marshall <robert@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#47969; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 5 May 2021 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.