From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Benson Chu" Newsgroups: gmane.emacs.bugs Subject: bug#62427: tab-bar-new-tab-to now handles cases with multiple side-windows Date: Mon, 27 Mar 2023 12:43:31 -0500 Message-ID: References: <875yapvoxh.fsf@fastmail.com> <86jzz4mynj.fsf@mail.linkov.net> <83cz4wb0vz.fsf@gnu.org> <865yamhdx7.fsf@mail.linkov.net> <83cz4u9uz1.fsf@gnu.org> <86jzz2f8si.fsf@mail.linkov.net> <83sfdq86pi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=df534513f5a34904b7b154017d119737 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28372"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.9.0-alpha0-236-g06c0f70e43-fm-20230313.001-g06c0f70e Cc: 62427@debbugs.gnu.org To: "Eli Zaretskii" , "Juri Linkov" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 27 19:45:19 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 1pgquE-00074R-4E for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Mar 2023 19:45:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgqu1-0001Xa-N4; Mon, 27 Mar 2023 13:45:05 -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 1pgqtz-0001Vi-FJ for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2023 13:45:03 -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 1pgqtz-0005UO-5g for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2023 13:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgqty-0006IB-DQ for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2023 13:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Benson Chu" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Mar 2023 17:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62427 X-GNU-PR-Package: emacs Original-Received: via spool by 62427-submit@debbugs.gnu.org id=B62427.167993904724099 (code B ref 62427); Mon, 27 Mar 2023 17:45:02 +0000 Original-Received: (at 62427) by debbugs.gnu.org; 27 Mar 2023 17:44:07 +0000 Original-Received: from localhost ([127.0.0.1]:48387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgqt4-0006Gc-TN for submit@debbugs.gnu.org; Mon, 27 Mar 2023 13:44:07 -0400 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:47455) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgqt2-0006Fy-Px for 62427@debbugs.gnu.org; Mon, 27 Mar 2023 13:44:05 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 1D7283200958; Mon, 27 Mar 2023 13:43:58 -0400 (EDT) Original-Received: from imap44 ([10.202.2.94]) by compute5.internal (MEProxy); Mon, 27 Mar 2023 13:43:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1679939037; x=1680025437; bh=jI +7uwNSt3r8wbOKtF7UBv6A+Dp3ChXOSJHKb3nGbi4=; b=ouFX+dn6M9+9z6O8O7 HMPoabFUKWrUBmLXYjAQVLb9FZ2VPOcT9Cw3Ktxi0xIyWMYv7DNzr1c621diG01K qGbBzH6BlFIwEn0wN9WXhNuwrELlMF1J/iSELgT2NnNOlBioT0Rjb3EpJoROgxz5 mDFNzHLhQikunHcRfeyzp/KT2Jn3PO3TdI8/8MJsOXnsSXxg9yS3Wt9NFfzBUkag s9QnVIEIi7vhIu8a38mNn15o5FZXMP2IlRpBRq2UvSFtV2tkCxkaP8xuUr69EtuZ npvIBkvYMiSzyKpVU1Tn28vryBFaXlOMaV9AfdywEdyXEL8hcDRehVcutMxlL+IR Xe6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1679939037; x=1680025437; bh=jI+7uwNSt3r8w bOKtF7UBv6A+Dp3ChXOSJHKb3nGbi4=; b=BvSrg+vqwUUAIU4s/awPKtOeYnQtM 1OpBr09fHdW0JC3vT3yUGaacHqi2sLkfChbrDgNWFBHFR44IlhKtAJR24ulsNxNv p2A4K6Xf+KDPVoAvfbHwh1oOhwGpBGi+TF4wQwIf1XtwWEPQHiN8790Vo/3wtgDm t9711IRu845WifpWGtU20V0q1bpJ/LNeurb6I468TeBRNwKoTjvgV60hXL1LLhUQ tDV7tLHjKF6u9R6GD7wbROeI4M5avMRfzCoLN1oqUaZallQJnakoLikvj6iQ2aRQ KAyETIWqx7VulD34bfj4GEYRd8JwG4+1+VtVNgh1SwgBR8ZZHUhXMqR+A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehvddguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesmhdtreerreertdenucfhrhhomhepfdeu vghnshhonhcuvehhuhdfuceosggvnhhsohhntghhuhegheejsehfrghsthhmrghilhdrtg homheqnecuggftrfgrthhtvghrnhepkeefffethfeikedvhffhvdfhtdefgeehgfdvheet keetvdevgefhhefgueelfffgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepsggvnhhsohhntghhuhegheejsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: id5c9466e:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id A90CB36A0076; Mon, 27 Mar 2023 13:43:56 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <83sfdq86pi.fsf@gnu.org> 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:258766 Archived-At: --df534513f5a34904b7b154017d119737 Content-Type: text/plain Oops, I only replied to Eli. I'll send my explanation, and new patch. > When the variable tab-bar-new-tab-choice is set to t, the intended > behavior is to create a new tab with a single window, and that single > window displaying the current buffer of the currently selected window, > and the new window should have a fresh set of window parameters. > Typically, this is done by first calling delete-other-windows, so the > currently selected window is the only window. The call to > delete-other-windows also ignores window-parameters, so even windows > that have the no-delete-other-windows parameter still get deleted. Then, > the current window is split, to create a fresh new window with fresh > window parameters, and then delete-window is called to delete the > currently selected window. > This strategy doesn't work when the current window is a side-window, > because delete-other-windows has a check which says that a side-window > cannot be the only window in a frame. So, to work around this, we just > remove the window-side parameter beforehand, so the above strategy still > works. > Another way we could do this was to get the current-buffer, then delete > all side-windows. After deleting all side-windows, we know the current > selected window is NOT a side-window, and then we can call > delete-other-windows, split-window, and delete-window. On Mon, Mar 27, 2023, at 12:06 PM, Eli Zaretskii wrote: >> From: Juri Linkov >> Cc: bensonchu457@fastmail.com, 62427@debbugs.gnu.org >> Date: Mon, 27 Mar 2023 19:39:25 +0300 >> >> > Maybe I'll agree, but I still don't understand the problem well >> > enough. Would you please explain the original problem that led >> > tab-bar.el to care about these window parameters? >> >> Sorry, I can't explain. I just did that Martin said to do >> in bug#53662. > > That's okay, Benson Chu explained it. > > Let me think about this. --df534513f5a34904b7b154017d119737 Content-Disposition: attachment; filename*0="0001-tab-bar-new-tab-now-handles-multiple-side-windows.patch" Content-Type: text/x-patch; name="=?UTF-8?Q?0001-tab-bar-new-tab-now-handles-multiple-side-windows.patch?=" Content-Transfer-Encoding: BASE64 RnJvbSA5NTk2ZmU0N2Y4OTljNzc1NjdmNDA1MTk5MGFkZDdhMzFjODcxOGFhIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBCZW5zb24gQ2h1IDxiZW5zb25jaHU0NTdAZ21haWwu Y29tPgpEYXRlOiBGcmksIDI0IE1hciAyMDIzIDE1OjM4OjAzIC0wNTAwClN1YmplY3Q6IFtQ QVRDSF0gOyB0YWItYmFyLW5ldy10YWIgbm93IGhhbmRsZXMgbXVsdGlwbGUgc2lkZS13aW5k b3dzCgo7IFByZXZpb3VzbHksIGNhbGxpbmcgdGFiLWJhci1uZXctdGFiLXRvIG9ubHkgcmVt b3ZlcyB0aGUgJ3dpbmRvdy1zaWRlCjsgcHJvcGVydHkg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XNpZGUpKQorICAgICAgICAgICAgICAgICAoc2V0LXdp bmRvdy1wYXJhbWV0ZXIgd2luZG93ICd3aW5kb3ctc2lkZSBuaWwpKSkKKyAgICAgICAgICAg ICBuaWwgdCkpKSkKICAgICAgIChsZXQgKChpZ25vcmUtd2luZG93LXBhcmFtZXRlcnMgdCkp CiAgICAgICAgIChpZiAoZXEgdGFiLWJhci1uZXctdGFiLWNob2ljZSAnY2xvbmUpCiAgICAg ICAgICAgICA7OyBDcmVhdGUgbmV3IHVuaXF1ZSB3aW5kb3dzIHdpdGggdGhlIHNhbWUgbGF5 b3V0Ci0tIAoyLjQwLjAKCg== --df534513f5a34904b7b154017d119737--