0

Sometimes when moving windows around in emacs, it will get to a state where there is a horizontal or vertical stack of windows which appears to be a single list, but is actually made up of multiple nested window lists.

For example, what appears on the screen is a single horizontal line of windows:
A B C D
but what is stored in emacs is
(A (B C) D)

Is there a function that will remove this unnecessary nesting? I couldn't figure out any good way to do it.

0

I would use -flatten from the dash library.

1
  • Unfortunately, this doesn't seem to work as it combines horizontal and vertical stacks together. Even if it did, it returns the tree instead of setting it, and I don't know that there's a way to directly set the window tree.
    – Prismavoid
    Aug 11 '21 at 3:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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