Subject: bug#16793: window-state-put needs a live window

From: Juanma Barranquero <[email-masked]>
Date: Tue, 18 Feb 2014 22:18:22 +0100

On Tue, Feb 18, 2014 at 8:04 PM, martin rudalics <[email-masked]> wrote:

> I tend to agree with you.  But the obvious consequence is that the
> WINDOW argument of `window-state-put' could then specify an internal
> window that is not the root window of its frame.  In this case plain
> `delete-other-windows' would be the wrong action.

Yeah. In my workaround that wasn't important because I specifically
got the frame's root.

>  I attach a patch.

Was this:

> +       (setq window (catch 'live
> +                      (walk-window-subtree
> +                       (lambda (window)
> +                         (when (window-live-p window)))
> +                       root))))

intended to be

  (setq window (catch 'live
                 (walk-window-subtree
                  (lambda (window)
                    (when (window-live-p window)
                      (throw 'live window)))
                  root))))

I suppose?

   J