From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#64373: 29.0.90; C-x t o while in minibuffer copies the current tab to the next tab Date: Mon, 03 Jul 2023 13:18:19 -0400 Message-ID: References: <86mt0gdcb4.fsf@mail.linkov.net> <87a5wgokn4.fsf@catern.com> <86v8f4bx4n.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33768"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64373@debbugs.gnu.org, sbaugh@catern.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 03 19:19:27 2023 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 1qGNCw-0008VX-LK for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Jul 2023 19:19:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGNCZ-0001OT-VU; Mon, 03 Jul 2023 13:19:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qGNCY-0001OH-Dq for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2023 13:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGNCY-0001VR-5R for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2023 13:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qGNCY-0007ni-0Z for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2023 13:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jul 2023 17:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64373 X-GNU-PR-Package: emacs Original-Received: via spool by 64373-submit@debbugs.gnu.org id=B64373.168840470829931 (code B ref 64373); Mon, 03 Jul 2023 17:19:01 +0000 Original-Received: (at 64373) by debbugs.gnu.org; 3 Jul 2023 17:18:28 +0000 Original-Received: from localhost ([127.0.0.1]:34407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGNBz-0007mh-FR for submit@debbugs.gnu.org; Mon, 03 Jul 2023 13:18:27 -0400 Original-Received: from mxout1.mail.janestreet.com ([38.105.200.78]:60811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGNBw-0007mQ-Uz for 64373@debbugs.gnu.org; Mon, 03 Jul 2023 13:18:25 -0400 In-Reply-To: <86v8f4bx4n.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 30 Jun 2023 21:52:56 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264540 Archived-At: Juri Linkov writes: >>>> 1. emacs -Q >>>> 2. C-x t 2 to create a new tab >>>> 3. C-x b *Messages* RET >>>> Now the first tab should have only *scratch* open, >>>> and the second tab should have only *Messages* open, >>>> and we're in the second tab. >>>> 4. M-: (read-from-minibuffer "") RET >>>> 5. While in minibuffer, C-x t o to switch to the first tab >>>> 6. RET to exit minibuffer >>>> 7. The first tab now has *Messages* open. >>>> >>>> This also applies to more complicated window configurations: the whole >>>> window configuration will be copied from the tab that the minibuffer was >>>> first open in, to the tab that was entered with C-x t o. >>>> >>>> This also happens if the minibuffer is exited with C-g. >>> >>> Not a bug, this is the documented behavior. >>> You can customize read-minibuffer-restore-windows to nil >>> if you don't like this. >> >> We should also restore the current tab, then. Because right now we're >> restoring the window configuration, but not the current tab. >> >> If we did that, then this would behave as expected: We'd restore the >> current tab, then restore the window configuration in that tab. > > We should not switch tabs without user's consent. > Even restoring the window configuration is the wrong thing to do. > I don't know why read-minibuffer-restore-windows should be enabled > by default. Maybe it should be disabled at least when the active > minibuffer switches to another tab. I agree we should not switch tabs without user's consent. However I would argue that tabs are basically part of window configuration, since they're a way of managing named window configurations, and if the user has set read-minibuffer-restore-windows to t then we should should restore the current tab as part of window configuration. I also agree that read-minibuffer-restore-windows should probably default to nil. But that's a separate discussion, changing a more significant default. Again: The current behavior of read-minibuffer-restore-windows is to restore window configurations, but not restore the tab. I say this is a bug, even if it's documented as doing that, which it is not. It clearly behaves badly, wiping out user data without user action: It wipes out the window configuration in the tab that the user switched to. That's definitely bad.