0

Here's a really nasty Emacs bug that has pained me for a long time. In tab-bar-mode with two tabs open (call them "tab X" and "tab Y,")

  1. Open tab X.
  2. Do C-f or a similar command that opens the minibuffer
  3. With the minibuffer open and selected/active switch to tab Y.
  4. Hit C-g to close the minibuffer.
  5. Observe that the window configuration of tab Y has been overwritten with the window configuration of tab X.

It took me an embarassingly long time to unpack this behavior. Ever since I started using Emacs (around emacs 27 era), I'd randomly have tabs dupe and I had no idea why. Now that I understand the problem, how do I fix it?

Edit

Some relevant info:

5
  • Consider providing more details - a recipe to reproduce, starting with emacs -Q (no init file). How are you switching to tab Y? What do you mean by the "window configuration of tab ___"? Please show such configurations.
    – Drew
    Commented Dec 30, 2023 at 22:26
  • Just checked and the steps to replicate this bug starting from emacs -Q are the same. Enter tab-bar-mode, create two tabs, open the minibuffer, switch tabs, close the minibuffer. The exact function to switch tabs is tab-bar-switch-to-next-tab Commented Dec 30, 2023 at 23:16
  • 2
    Any time you discover a bug in Emacs ("really nasty" or otherwise) you ought to M-x report-emacs-bug with all of the details, so that it's registered and can be fixed. Provide all the details and the recipe from emacs -Q in your bug report.
    – phils
    Commented Dec 31, 2023 at 1:09
  • "Window configuration" is one thing. But what is "window configuration of a" tab? That's what's not clear. In what way does a tab have its own window configuration?
    – Drew
    Commented Dec 31, 2023 at 2:46
  • Drew: in tab-bar-mode tabs are associated with window configurations. Selecting a tab restores the window configuration for that tab.
    – phils
    Commented Dec 31, 2023 at 7:33

1 Answer 1

1

Fortunately, this bug was fixed in Emacs 30 six months ago. Is it possible for you to upgrade to Emacs 30?

3
  • better to provide a link to the relevant bug report or commit to fix the bug
    – shynur
    Commented Dec 31, 2023 at 9:39
  • Second this, a link to a diff or bug report would be helpful Commented Dec 31, 2023 at 13:13
  • here is a link to the relevant bug report debbugs.gnu.org/64373
    – link0ff
    Commented Jan 2 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.