reddit / emacs

"<#window XXX> is not a valid window" on switching tabs

titaniumbones · 2022-02-16 00:22
pretty recent emacs git, with tab-bar-mode activated and a set of persistent tabs saved in my desktop file. I recently had some small glitch on restarting emacs, htough I can't for the life of me remember what. Now, everything works more or less normally except that I am unable to manipulate one of my tabs (named "WDW"). Whenever I try to switch to that tab (with `tab-bar-switch-to-tab`), I end up back in the previous tab and get the error in the subject line. I've just turned on `debu-on-error` and this is what I see: ``` Debugger entered--Lisp error: (error "#<window 109> is not a valid window") error("%s is not a valid window" #<window 109>) window-normalize-window(#<window 109>) window-deletable-p(#<window 109>) window-state-put((((min-height . 8) (min-width . 20) (min-height-ignore . 4) (min-width-ignore . 12) (min-height-safe . 2) (min-width-safe . 4) (min-pixel-height . 168) (min-pixel-width . 200) (min-pixel-height-ignore . 84) (min-pixel-width-ignore . 120) (min-pixel-height-safe . 42) (min-pixel-width-safe . 40)) vc (pixel-width . 2048) (pixel-height . 1008) (total-width . 205) (total-height . 48) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (hc (pixel-width . 2048) (pixel-height . 798) (total-width . 205) (total-height . 38) (normal-height . 0.7916666666666667) (normal-width . 1.0) (combination-limit) (leaf (pixel-width . 1028) (pixel-height . 798) (total-width . 103) (total-height . 38) (normal-height . 1.0) (normal-width . 0.5) (buffer "test.py" (selected . t) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 2 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 72) (start . 1)) (prev-buffers ("cards.js" 367 1480) ("__init__.pyi" 21558 22551) ("*helpful variable: completion-at-point-functions*" 244 1615) ("DHU236/Lectures.org" 93135 95371) ("DHU236/Assignments.org" 62643 63879) ("DHU236/Pages.org" 591 2208) ("org-lms.org" 214188 214910) ("emacs-init.org" 127438 130382) ("corfu.el" 3265 4543) ("DHU236/Announcements.org" 12275 14041))) (leaf (last . t) (pixel-width . 1020) (pixel-height . 798) (total-width . 102) (total-height . 38) (normal-height . 1.0) (normal-width . 0.5) (buffer "*tree-sitter-tree: cards.js*" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 2 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 1) (start . 1)))) (leaf (last . t) (pixel-width . 2048) (pixel-height . 210) (total-width . 205) (total-height . 10) (normal-height . 0.20833333333333331) (normal-width . 1.0) (parameters (window-side . bottom) (window-slot . 0)) (buffer "*tree-sitter-query-builder*" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 2 t nil 0 t nil) (vscroll . 0) (dedicated . side) (point . 1) (start . 1)))) nil safe) tab-bar-select-tab(1) tab-bar-switch-to-tab("WDW") mwp-tab-wdw() ``` The specific window number is different each time I call it, and always increments. I'm imagining there's something wrong with the window-state object, but I admit that I totally can't read that code. I'm also unable to delete the tab completely. Does this make sense to anyone?
00-11 · 2022-02-16 03:48
Consider reporting that not-very-helpful error message as needing improvement: `M-x report-emacs-bug`.
link0ff · 2022-02-22 17:00
Thanks for the bug report. This bug is fixed now in Emacs 28.
titaniumbones · 2022-02-22 17:30
Whoa. Thanks, that's great!