From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#44933: 27.1; Ephemeral frame selection shrinks minibuffer Date: Sun, 29 Nov 2020 09:22:00 +0100 Message-ID: References: <65A18F9E-3193-4DBD-84D8-4EDCA5AB95A1@toadstyle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29050"; mail-complaints-to="usenet@ciao.gmane.io" To: Sean Devlin , 44933@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 29 09:23:56 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjHzw-0007SK-DE for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Nov 2020 09:23:56 +0100 Original-Received: from localhost ([::1]:35766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjHzv-0001AJ-0U for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Nov 2020 03:23:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjHz4-000196-MU for bug-gnu-emacs@gnu.org; Sun, 29 Nov 2020 03:23:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjHz4-0003w9-FY for bug-gnu-emacs@gnu.org; Sun, 29 Nov 2020 03:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjHz4-00027h-CI for bug-gnu-emacs@gnu.org; Sun, 29 Nov 2020 03:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Nov 2020 08:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44933 X-GNU-PR-Package: emacs Original-Received: via spool by 44933-submit@debbugs.gnu.org id=B44933.16066381328067 (code B ref 44933); Sun, 29 Nov 2020 08:23:02 +0000 Original-Received: (at 44933) by debbugs.gnu.org; 29 Nov 2020 08:22:12 +0000 Original-Received: from localhost ([127.0.0.1]:49612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjHyF-000263-Hs for submit@debbugs.gnu.org; Sun, 29 Nov 2020 03:22:11 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:34829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjHyC-00025n-Rh for 44933@debbugs.gnu.org; Sun, 29 Nov 2020 03:22:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606638122; bh=eKj9AtUYeBLcVPkGubcG1kSEzGw0erVr1XVbaokvk0Q=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=j1hfXBk2moQh9m3KNjSOBvsF5VC4ppoOXYHBLGdJM7oAElhJM8xfknC/Hp0gdwia3 ZKWPH87UBMSElMnMrCO2/S+32e7YznSy/dzjWy3fszpsjXmkXGf7huwwffK+sxTBQC CTAH8sgEAlyuJJCApBcR5Ewg95h4efqQtXREBUlc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.227]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MbAh0-1kCQ7d3wJU-00bbSm; Sun, 29 Nov 2020 09:22:02 +0100 In-Reply-To: <65A18F9E-3193-4DBD-84D8-4EDCA5AB95A1@toadstyle.org> Content-Language: en-US X-Provags-ID: V03:K1:smhYfoX3kXe3JSQWoJJhOQaFqbFxt3joDCNJJ+O/NtdPuegjCUR ECPfR1em5iRpgtBmwJO31kDF/Cil44HNmJJTNqayONo2GFb9zuLC8cyl1p4VWeuc0YBt2L3 pzSqXxmlX+c3nkfFXhGuxBGi2iq8BdjQNX5Y0sLfgqz/KH99TiE+NbfahDf4JmG8mEScUaA +0KviEp900GnzIu5B++0w== X-UI-Out-Filterresults: notjunk:1;V03:K0:99hMgVuNPuE=:x1uD2pQ2wMGOzVWb0IVplr NHbcS5arcbXXb7XHKfGDuv130xP+zuQCUFAI8pjQ3ju1j2x3wh7UTQLamPHnnXOLsy6ay/U/R ZZ3Td39WXNMTlZOqiAnIfODqcg4Lhjs8ji+LH5/0txGzCM3HDqgSRm2bRbvPfHelubTrlqJ9c t0qvwmH5cDWgApsUvSgPrFnCB9YWJUld7TmseFZHlAmpkKt+nysmV9cN0slVtKYBArE+W9y9J i8Rd4PBQbA5RBUXS7pvTQr9emoXu6uP9PtI4cdddU78jvvatN1F2XbXQ8vw7Kc3KVQ9jFilEZ ApOGb+24P1+ZU4y7tCIa91dQbd4EanFNhgvfPgirU4d+O8Xx5bm23EXUmNHivh3qIwv5JkUYi TfEgBxzEfOTtORBgrh8myWMAXxxTESuYpmZ6//sy86XZjknkrl6nL0sX/eqrUnBG/Ll2P8/vM H0JTs4tN0QeitTz/WTFQ4UxYDYBi6iEpUl1T3ijFht2VtwDtmhNlwdcvAxHwAmunkTndnDaT0 axmB8ihyslwWqctc/gAvdBJmSZrAIGv9N6aF5P4QifgMNols6+yFjM7GHIbc4S9c8UHvZkoo5 qp7cMhkoN3bSZLWmcCpqHbc4KHuevGdbuccSFFfuVgadhlipeEfPzng76N+V+mVpgsSTYGqbL bbUr2n2PuVjyzTWRam6eOFLX3S+w+42s779EPSYMI9euMv7vrvyuqAnczwKaXYgwaLm2cjM2n /VhEQTUqjb1AxdgCv7oC/QcFnwu+TKuqgUhVD5eHRu2dZ7LEbhwgG+5MAdbvx2PF1c2Ul7G5 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194527 Archived-At: > Selecting a different frame ephmerally (e.g. via `with-selected-frame` > in a timer callback) shrinks the minibuffer. This is true whether or not > the minibuffer is active. > > Reproduction steps: > > 1. Evaluate this form in the scratch buffer: > > (run-with-timer nil 13 (lambda () (with-selected-frame > (next-frame)))) > > 2. Evaluate this form in the scratch buffer: > > (run-with-timer nil 11 (lambda () (window-resize (minibuffer-window) > 10))) > > 3. Observe that the minibuffer grows and shrinks as the timers fire. Here I need two frames to observe 3. With one frame the minibuffer window grows continuously. > You can run some completing read command (e.g. `M-x`) to see that the > resizing happens whether or not the minibuffer is active. > > This is relevant for completing read implementations that resize the > minibuffer to display a vertical list of candidates. I noticed the > behavior while using selectrum (https://github.com/raxod502/selectrum) > while I had a subprocess running under term in another frame. Since the > `term-emulate-terminal` function selects windows in the background > whenever the subprocess sends output, it was causing the selectrum > minibuffer to shrink. > > I'm not sure what the correct behavior is here, but this was unexpected > to me. I think that if the minibuffer is active, ephemeral frame or > window selections should not affect its size. (I'm less certain about > the inactive minibuffer case, but I think the size should stay the same > there as well.) To my knowledge we have no means to select a frame "ephemerally". 'with-selected-frame', 'with-selected-window' are just as "hard" as 'select-frame' and 'select-window'. And so the only way to prevent switching frames from shrinking the previously selected frame's minibuffer window is to set 'resize-mini-windows' to nil. OTOH with 'resize-mini-windows' non-nil, re-selecting the previously selected frame when returning from a 'with-selected-frame' should size its minibuffer window back to its contents provided it is still active. But I'm never sure whether all these work as advertised. martin