Subject: Re: bug#51007: 27.2; emacs hangs when using window-toggle-side-windows

From: martin rudalics <[email-masked]>
Date: Tue, 5 Oct 2021 14:37:09 +0200

> Hi, I tried with following code, in scratch
[...]
 > In both cases, after doing following:
 >
 > 1. `C-x 3`
 > 2. `C-h i`
 > 3. `C-h m`
 > 4. `M-x window-toggle-side-windows RET`
 >
 > emacs still hangs.

Both work here in Emacs 26 and 27 - with 'window-toggle-side-windows'
called twice.  Does yours really hang already in the first call?

Anyway, please with emacs -Q do C-x 5 2, C-u C-M-x in your version of
`window-toggle-side-windows' in *scratch* on the second frame and in the
first frame display *Messages* and then proceed as above, stepping
through that function with SPC.  This way we should be able to find out
where it hangs.  If you find the culprit, please edebug the function
where it hangs - originally I'd have suspected 'window-state-put' but if
it really hangs in the first call it would be 'window-state-get'.

Thanks, martin