From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: How to restore the layout? Date: Fri, 5 Jul 2013 18:02:32 +0200 Message-ID: References: <51C5AA68.4000204@alice.it> <51CE9B05.1090202@gmx.at> <51CFFBED.7090400@gmx.at> <51D02AB0.5070103@gmx.at> <51D5DE14.4090507@alice.it> <51D600D8.90801@alice.it> <51D67990.3090800@gmx.at> <51D6D1E1.10902@alice.it> <51D6E006.9070405@alice.it> <51D6E693.30102@gmx.at> <51D6EC1E.6010902@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1373040201 13043 80.91.229.3 (5 Jul 2013 16:03:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jul 2013 16:03:21 +0000 (UTC) Cc: Emacs developers , Angelo Graziosi To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 05 18:03:21 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uv8Te-0005kQ-O9 for ged-emacs-devel@m.gmane.org; Fri, 05 Jul 2013 18:03:18 +0200 Original-Received: from localhost ([::1]:33791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv8Te-0001S8-CC for ged-emacs-devel@m.gmane.org; Fri, 05 Jul 2013 12:03:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv8Tb-0001P7-F0 for emacs-devel@gnu.org; Fri, 05 Jul 2013 12:03:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uv8TZ-0003MD-Lo for emacs-devel@gnu.org; Fri, 05 Jul 2013 12:03:15 -0400 Original-Received: from mail-ie0-x22e.google.com ([2607:f8b0:4001:c03::22e]:39917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv8TZ-0003M7-Fm for emacs-devel@gnu.org; Fri, 05 Jul 2013 12:03:13 -0400 Original-Received: by mail-ie0-f174.google.com with SMTP id 9so5687154iec.33 for ; Fri, 05 Jul 2013 09:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=1KfzEfSj3CBALjCmq1YNUTsHynreIUg3BKfRb6a1Ox8=; b=v6Y8fWY/jOXyARlMHCoRln38JA5NUs0dq8fZsv7tYDrBpXEY2L+UbUMHpl9IoaU9hM G4aKytrna+L3hSUjJs5zUamsW2sXOqfU1FavvAkCvHD0rpiILyz0KpKuJor0jcDJpnoI GnlF/SBGbwwQhowcM9FDm05tei6o+VFZ3utwfeaFVL5DnUPyGhYklh1RyvWIYSM44sbL B3d8qDrQhxPb11KUCLsneHJixKTVQxHddlyhv62ojSCoWYuSYVqeypP/097sFyoc2GO/ 7JXKDqqVY3MSXvp14ONsXnFF3YKdkcWqBOce41J3KFe05bzBUYFE6Sg8aVw66Ur+v1cw ORdQ== X-Received: by 10.50.127.139 with SMTP id ng11mr18510825igb.6.1373040192955; Fri, 05 Jul 2013 09:03:12 -0700 (PDT) Original-Received: by 10.64.250.7 with HTTP; Fri, 5 Jul 2013 09:02:32 -0700 (PDT) In-Reply-To: <51D6EC1E.6010902@gmx.at> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161605 Archived-At: > 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