[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to restore the layout?
From: |
Juanma Barranquero |
Subject: |
Re: How to restore the layout? |
Date: |
Fri, 5 Jul 2013 18:02:32 +0200 |
> We could add a variable
>
> (defvar window-state-put-stale-windows nil
> "Helper variable for `window-state-put'.")
>
> use
>
>
> (let ((buffer ((get-buffer (car state)))))
> (if buffer
> (set-window-buffer window buffer)
> (switch-to-prev-buffer window)
Why? In case the window cannot be deleted?
> (setq window-state-put-stale-windows
> (cons window window-state-put-stale-windows))))
AKA (push window window-state-put-stale-windows)
> and before the final call to `window--check-frame' simply add a
>
> (dolist (window window-state-put-stale-windows)
> (when (window-deletable-p window)
> (delete-window window)))
(ignore-errors (delete-window window))
to protect only windows (i.e., when window-deletable-p returns `frame').
I like this.
J
- Re: How to restore the layout?, (continued)
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/04
- Re: How to restore the layout?, martin rudalics, 2013/07/05
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/05
- Re: How to restore the layout?, Angelo Graziosi, 2013/07/05
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/05
- Re: How to restore the layout?, Angelo Graziosi, 2013/07/05
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/05
- Re: How to restore the layout?, martin rudalics, 2013/07/05
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/05
- Re: How to restore the layout?, martin rudalics, 2013/07/05
- Re: How to restore the layout?,
Juanma Barranquero <=
- Re: How to restore the layout?, martin rudalics, 2013/07/05
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/05
- Re: How to restore the layout?, martin rudalics, 2013/07/05
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/06
- Re: How to restore the layout?, martin rudalics, 2013/07/07
- Re: How to restore the layout?, martin rudalics, 2013/07/05
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/05
- Re: How to restore the layout?, martin rudalics, 2013/07/05
- Re: How to restore the layout?, Juanma Barranquero, 2013/07/05
- Re: How to restore the layout?, martin rudalics, 2013/07/05