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

From: martin rudalics <[email-masked]>
Date: Mon, 4 Oct 2021 20:22:42 +0200

> 1. start vanila, emacs session.
 > 2. add following configuration.
 > (setq debug-on-quit 1)
 > (setq display-buffer-alist
 >         '(
 >           ("\\*\\(Async Shell Command\\|Shell Command Output\\)\\*"
 >           (display-buffer-reuse-window display-buffer-in-side-window)
 >           (window-width . 0.40)
 >           (side . right)
 >           (slot . 0))
 >           ("\\*Shell\\*"
 >           (display-buffer-reuse-window display-buffer-in-side-window)
 >           (window-width . 0.40)
 >           (side . top)
 >           (slot . 0))
 >          )
 >         )
 >
 > 3. split the window horizontally `C-x 3`
 > 4. start a shell `M-x shell RET`
 > 5. Run a async shell `M-x async-command-shell ls RET`
 > 6. Run `M-x window-toggle-side-windows RET` the session stalls nothing works.
 >
 > - C-g does not help in this case.
 > - C-x C-z does not help.
 > - C-x C-c does not help.
 >
 >
 > In GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
 > of 2021-03-28 built on builder10-14.porkrind.org
 > Windowing system distributor 'Apple', version 10.3.2022
 > System Description:  macOS 11.6

I can't try your recipe because `async-command-shell' isn't defined
here.  When I try with

(setq debug-on-quit 1)
(setq display-buffer-alist
        '(
          ("\\*Info\\*"
          (display-buffer-reuse-window display-buffer-in-side-window)
          (window-width . 0.40)
          (side . right)
          (slot . 0))
          ("\\*Help\\*"
          (display-buffer-reuse-window display-buffer-in-side-window)
          (window-height . 0.40)
          (side . top)
          (slot . 0))
         )
        )

everything works as expected so the problem seems that shell command
output wants to use the window used for ls, or vice-versa.

martin