From unknown Sat Jun 14 19:27:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64373: 29.0.90; C-x t o while in minibuffer copies the current tab to the next tab Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jun 2023 18:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64373 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 64373@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168814891420397 (code B ref -1); Fri, 30 Jun 2023 18:16:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jun 2023 18:15:14 +0000 Received: from localhost ([127.0.0.1]:55732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFIeH-0005Iv-BJ for submit@debbugs.gnu.org; Fri, 30 Jun 2023 14:15:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:34024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFIeE-0005Ik-Ox for submit@debbugs.gnu.org; Fri, 30 Jun 2023 14:15:11 -0400 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 1qFIeB-0007HB-CB for bug-gnu-emacs@gnu.org; Fri, 30 Jun 2023 14:15:07 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFIe5-0003xL-2f for bug-gnu-emacs@gnu.org; Fri, 30 Jun 2023 14:15:06 -0400 From: Spencer Baugh Date: Fri, 30 Jun 2023 14:14:58 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; helo=mxout5.mail.janestreet.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, GAPPY_SUBJECT=0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. In GNU Emacs 29.0.90 (build 9, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2023-06-13 built on igm-qws-u22796a Repository revision: 2ff60641725661c306ed172ca09a8452d9be0db1 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: CentOS Linux 7 (Core) Configured using: 'configure --with-x-toolkit=lucid --with-gif=ifavailable' Configured features: CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Messages Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t tab-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 buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr cl-print byte-opt gv bytecomp byte-compile debug backtrace find-func thingatpt help-fns radix-tree emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils subr-x cl-extra help-mode icons cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 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 nadvice seq simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 76697 13286) (symbols 48 10635 0) (strings 32 27067 2042) (string-bytes 1 806210) (vectors 16 12147) (vector-slots 8 176898 14217) (floats 8 40 52) (intervals 56 423 53) (buffers 976 14) (heap 1024 13951 1022)) From unknown Sat Jun 14 19:27:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64373: 29.0.90; C-x t o while in minibuffer copies the current tab to the next tab Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jun 2023 18:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64373 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Spencer Baugh Cc: 64373@debbugs.gnu.org Received: via spool by 64373-submit@debbugs.gnu.org id=B64373.168815046323334 (code B ref 64373); Fri, 30 Jun 2023 18:42:02 +0000 Received: (at 64373) by debbugs.gnu.org; 30 Jun 2023 18:41:03 +0000 Received: from localhost ([127.0.0.1]:55764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFJ3H-00064H-1Z for submit@debbugs.gnu.org; Fri, 30 Jun 2023 14:41:03 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:53285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFJ3E-00063d-8G for 64373@debbugs.gnu.org; Fri, 30 Jun 2023 14:41:01 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 2AD8560005; Fri, 30 Jun 2023 18:40:52 +0000 (UTC) From: Juri Linkov In-Reply-To: (Spencer Baugh's message of "Fri, 30 Jun 2023 14:14:58 -0400") Organization: LINKOV.NET References: Date: Fri, 30 Jun 2023 21:39:43 +0300 Message-ID: <86mt0gdcb4.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) > 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. From unknown Sat Jun 14 19:27:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64373: 29.0.90; C-x t o while in minibuffer copies the current tab to the next tab Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jun 2023 18:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64373 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 64373@debbugs.gnu.org, Spencer Baugh Received: via spool by 64373-submit@debbugs.gnu.org id=B64373.168815066623669 (code B ref 64373); Fri, 30 Jun 2023 18:45:01 +0000 Received: (at 64373) by debbugs.gnu.org; 30 Jun 2023 18:44:26 +0000 Received: from localhost ([127.0.0.1]:55769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFJ6X-00069g-JU for submit@debbugs.gnu.org; Fri, 30 Jun 2023 14:44:25 -0400 Received: from s.wrqvwxzv.outbound-mail.sendgrid.net ([149.72.154.232]:45126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFJ6V-00069S-Ex for 64373@debbugs.gnu.org; Fri, 30 Jun 2023 14:44:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=3DYTXR9Xf0dt3lfq2uI+wZf4BMODUALQaRPNYxOweig=; b=TBKFMrUYiCjmZg4AY/3JekRGUgmat1Knoq6yZIb/WsUFjcVVxzvkKPVLp2Ng1ofdJu6r MkQPqVihN2v/V23lCxKiHKV3/CV1mxHt6c4/lW+io/n5SNKyfz4rf5jO2K+vze2muCmk+X tmtruSEHvTF13L1O8i0UOF+vms6qel+y9yuF20wVkjCjGG4SekYsmWCy2IBTExf1O7ny1u 3rd26vvwbcXEBDBJcC6XxKGDQFimQRFZJ5ASuB6Ith/knY9U14/pG44cyCkDCfpYbPGQcY 7VzwVsjUGyRBqbFEj1Nxr93JPZ5SNR3lQ+6edhbwgrniz0Kv+4IzWc3Tt+kLIG/Q== Received: by filterdrecv-66949dbc98-fvstg with SMTP id filterdrecv-66949dbc98-fvstg-1-649F2280-46 2023-06-30 18:44:16.958135706 +0000 UTC m=+4388675.657070127 Received: from earth.catern.com (unknown) by geopod-ismtpd-4 (SG) with ESMTP id g_xjXoi5Sh-ib3TVabmcWg Fri, 30 Jun 2023 18:44:16.806 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver= Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id F1DD36008D; Fri, 30 Jun 2023 14:44:15 -0400 (EDT) From: sbaugh@catern.com In-Reply-To: <86mt0gdcb4.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 30 Jun 2023 21:39:43 +0300") References: <86mt0gdcb4.fsf@mail.linkov.net> Date: Fri, 30 Jun 2023 18:44:16 +0000 (UTC) Message-ID: <87a5wgokn4.fsf@catern.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbKsQdyJyi0Rv1Bz02+DgI6bRVBSbvxrD6v1qDTH1o6su7zN4MwJM30amcvtbdGDqkTCmQ1YqKMkZjLDTk4M5S1SI0kKABLWi9CIflBeAbshRED6ov1Zc9fRYMHbfZ6mJbMJlza90XQi0yTAiaHB7p0n3ybo7lIJ8bHBHv7SB262mg== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: 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 hav [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [149.72.154.232 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.1 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) 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. From unknown Sat Jun 14 19:27:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64373: 29.0.90; C-x t o while in minibuffer copies the current tab to the next tab Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jun 2023 18:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64373 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: sbaugh@catern.com Cc: 64373@debbugs.gnu.org, Spencer Baugh Received: via spool by 64373-submit@debbugs.gnu.org id=B64373.168815122624880 (code B ref 64373); Fri, 30 Jun 2023 18:54:01 +0000 Received: (at 64373) by debbugs.gnu.org; 30 Jun 2023 18:53:46 +0000 Received: from localhost ([127.0.0.1]:55778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFJFZ-0006TD-TQ for submit@debbugs.gnu.org; Fri, 30 Jun 2023 14:53:46 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:57709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFJFX-0006S5-6J for 64373@debbugs.gnu.org; Fri, 30 Jun 2023 14:53:44 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 90CD0C0002; Fri, 30 Jun 2023 18:53:34 +0000 (UTC) From: Juri Linkov In-Reply-To: <87a5wgokn4.fsf@catern.com> (sbaugh@catern.com's message of "Fri, 30 Jun 2023 18:44:17 +0000 (UTC)") Organization: LINKOV.NET References: <86mt0gdcb4.fsf@mail.linkov.net> <87a5wgokn4.fsf@catern.com> Date: Fri, 30 Jun 2023 21:52:56 +0300 Message-ID: <86v8f4bx4n.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) >>> 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. From unknown Sat Jun 14 19:27:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64373: 29.0.90; C-x t o while in minibuffer copies the current tab to the next tab 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 X-GNU-PR-Keywords: To: Juri Linkov Cc: 64373@debbugs.gnu.org, sbaugh@catern.com Received: via spool by 64373-submit@debbugs.gnu.org id=B64373.168840470829931 (code B ref 64373); Mon, 03 Jul 2023 17:19:01 +0000 Received: (at 64373) by debbugs.gnu.org; 3 Jul 2023 17:18:28 +0000 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 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 From: Spencer Baugh In-Reply-To: <86v8f4bx4n.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 30 Jun 2023 21:52:56 +0300") References: <86mt0gdcb4.fsf@mail.linkov.net> <87a5wgokn4.fsf@catern.com> <86v8f4bx4n.fsf@mail.linkov.net> Date: Mon, 03 Jul 2023 13:18:19 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) 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. From unknown Sat Jun 14 19:27:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64373: 29.0.90; C-x t o while in minibuffer copies the current tab to the next tab Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jul 2023 19:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64373 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Spencer Baugh Cc: 64373@debbugs.gnu.org, sbaugh@catern.com Received: via spool by 64373-submit@debbugs.gnu.org id=B64373.16884111319145 (code B ref 64373); Mon, 03 Jul 2023 19:06:01 +0000 Received: (at 64373) by debbugs.gnu.org; 3 Jul 2023 19:05:31 +0000 Received: from localhost ([127.0.0.1]:34507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGOrY-0002NO-0V for submit@debbugs.gnu.org; Mon, 03 Jul 2023 15:05:31 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:49491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGOrS-0002N3-Si for 64373@debbugs.gnu.org; Mon, 03 Jul 2023 15:05:27 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 8304320004; Mon, 3 Jul 2023 19:05:14 +0000 (UTC) From: Juri Linkov In-Reply-To: (Spencer Baugh's message of "Mon, 03 Jul 2023 13:18:19 -0400") Organization: LINKOV.NET References: <86mt0gdcb4.fsf@mail.linkov.net> <87a5wgokn4.fsf@catern.com> <86v8f4bx4n.fsf@mail.linkov.net> Date: Mon, 03 Jul 2023 21:58:03 +0300 Message-ID: <86v8f03jir.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) > 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. And I agree that we should do something to fix this behavior. But what to do exactly is not yet clear. While looking at the tabs as frames grouped inside one frame, then by analogy we could do the same how read-minibuffer-restore-windows behaves in regard to frames. After replacing 'C-x t' with 'C-x 5' in your test case, I see that read-minibuffer-restore-windows=t works inconsistently. You can also try to change buffers in both frames while the minibuffer is active. Then exiting the minibuffer does unexpected things. So maybe tabs would need own solution, e.g. with a new variable read-minibuffer-restore-tabs based on read-minibuffer-restore-windows, or a new variable minibuffer-follows-selected-tab based on minibuffer-follows-selected-frame. From unknown Sat Jun 14 19:27:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64373: 29.0.90; C-x t o while in minibuffer copies the current tab to the next tab Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Jul 2023 18:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64373 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: sbaugh@catern.com Cc: 64373@debbugs.gnu.org, Spencer Baugh Received: via spool by 64373-submit@debbugs.gnu.org id=B64373.168849600725543 (code B ref 64373); Tue, 04 Jul 2023 18:41:01 +0000 Received: (at 64373) by debbugs.gnu.org; 4 Jul 2023 18:40:07 +0000 Received: from localhost ([127.0.0.1]:36618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGkwY-0006dv-Jp for submit@debbugs.gnu.org; Tue, 04 Jul 2023 14:40:06 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:57797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGkwW-0006dH-5f for 64373@debbugs.gnu.org; Tue, 04 Jul 2023 14:40:05 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 93B0360004; Tue, 4 Jul 2023 18:39:56 +0000 (UTC) From: Juri Linkov In-Reply-To: <87a5wgokn4.fsf@catern.com> (sbaugh@catern.com's message of "Fri, 30 Jun 2023 18:44:17 +0000 (UTC)") Organization: LINKOV.NET References: <86mt0gdcb4.fsf@mail.linkov.net> <87a5wgokn4.fsf@catern.com> Date: Tue, 04 Jul 2023 21:28:18 +0300 Message-ID: <86bkgra5et.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) --=-=-= Content-Type: text/plain > 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. I was unaware about this problem because I have customized read-minibuffer-restore-windows to nil. Now that you found the problem, I looked at it from the point of view of users who don't mind the default value t of read-minibuffer-restore-windows, and agree now that for read-minibuffer-restore-windows to continue doing what it's intended to do, the only way is to switch to the original tab back. Here is a preliminary patch that might need more testing: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=tab-bar-minibuffer-restore-windows.patch diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 87ca80ce00a..f0668374773 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1253,6 +1260,14 @@ tab-bar--tabs-recent tabs)))) +(defvar tab-bar-minibuffer-restore-tab nil) + +(defun tab-bar-minibuffer-restore-windows () + (when (and read-minibuffer-restore-windows + tab-bar-minibuffer-restore-tab) + (tab-bar-select-tab tab-bar-minibuffer-restore-tab) + (setq tab-bar-minibuffer-restore-tab nil))) + (defun tab-bar-select-tab (&optional tab-number) "Switch to the tab by its absolute position TAB-NUMBER in the tab bar. When this command is bound to a numeric key (with a key prefix or modifier key @@ -1278,6 +1293,11 @@ tab-bar-select-tab (to-index (1- (max 1 (min to-number (length tabs))))) (minibuffer-was-active (minibuffer-window-active-p (selected-window)))) + (when (and read-minibuffer-restore-windows minibuffer-was-active + (not tab-bar-minibuffer-restore-tab)) + (setq tab-bar-minibuffer-restore-tab (1+ from-index)) + (add-hook 'minibuffer-exit-hook 'tab-bar-minibuffer-restore-windows)) + (unless (eq from-index to-index) (let* ((from-tab (tab-bar--tab)) (to-tab (nth to-index tabs)) --=-=-=-- From unknown Sat Jun 14 19:27:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64373: 29.0.90; C-x t o while in minibuffer copies the current tab to the next tab Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jul 2023 17:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64373 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Spencer Baugh Cc: 64373@debbugs.gnu.org Received: via spool by 64373-submit@debbugs.gnu.org id=B64373.168857775216905 (code B ref 64373); Wed, 05 Jul 2023 17:23:02 +0000 Received: (at 64373) by debbugs.gnu.org; 5 Jul 2023 17:22:32 +0000 Received: from localhost ([127.0.0.1]:38898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qH6D2-0004Oa-BA for submit@debbugs.gnu.org; Wed, 05 Jul 2023 13:22:32 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:42959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qH6D0-0004OI-7M; Wed, 05 Jul 2023 13:22:31 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 47E811C0003; Wed, 5 Jul 2023 17:22:21 +0000 (UTC) From: Juri Linkov In-Reply-To: (Spencer Baugh's message of "Fri, 30 Jun 2023 14:14:58 -0400") Organization: LINKOV.NET References: Date: Wed, 05 Jul 2023 20:21:41 +0300 Message-ID: <86fs626zq2.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) close 64373 30.0.50 thanks > 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. Thanks for bringing up this problem. Now it's fixed in master.