emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tab-bar: Making a new tab without no-delete-other-windows windows


From: Adam Porter
Subject: tab-bar: Making a new tab without no-delete-other-windows windows
Date: Fri, 24 Sep 2021 01:35:43 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Juri, et al,

I've been experimenting with tab-bar, and I noticed that, when I make a
new tab, e.g. with "C-x t 2", any windows that have the
no-delete-other-windows parameter set are displayed in the new tab.

I guess sometimes that might be what's desired, e.g. when using a side
window that the user wants to be displayed regardless of window
configuration.  But in my case, I have some side windows in a tab that
are only relevant to that tab's purpose, and when I make a new tab, I
don't want those side windows to be included in it.  As it is, I have to
"C-x 0" on each unwanted window after making the new tab, which is
awkward.

So I added this to my config, which seems to solve it for me:

  (use-package tab-bar
    :config
    (defun ap/really-delete-other-windows (&rest _ignore)
      (let ((ignore-window-parameters t))
        (delete-other-windows)))
    (cl-pushnew #'ap/really-delete-other-windows
                tab-bar-tab-post-open-functions))

I wonder, would it be worth including something like this by default, or
as a "batteries-included" choice in the customization option?

--
Thanks,
Adam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]