From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: How to restore the layout? Date: Fri, 05 Jul 2013 19:03:48 +0200 Message-ID: <51D6FC74.8090204@gmx.at> 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; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1373043841 18723 80.91.229.3 (5 Jul 2013 17:04:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jul 2013 17:04:01 +0000 (UTC) Cc: Emacs developers , Angelo Graziosi To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 05 19:04:01 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 1Uv9QO-0005oJ-Fa for ged-emacs-devel@m.gmane.org; Fri, 05 Jul 2013 19:04:00 +0200 Original-Received: from localhost ([::1]:50610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv9QN-0004d0-Fb for ged-emacs-devel@m.gmane.org; Fri, 05 Jul 2013 13:03:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv9QJ-0004ci-5k for emacs-devel@gnu.org; Fri, 05 Jul 2013 13:03:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uv9QH-0008Eo-VL for emacs-devel@gnu.org; Fri, 05 Jul 2013 13:03:55 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:58944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv9QH-0008ET-MR for emacs-devel@gnu.org; Fri, 05 Jul 2013 13:03:53 -0400 Original-Received: from [62.47.48.72] ([62.47.48.72]) by mail.gmx.com (mrgmx002) with ESMTPA (Nemesis) id 0MFuWk-1UxqZF1XBG-00EyJj; Fri, 05 Jul 2013 19:03:51 +0200 In-Reply-To: X-Provags-ID: V03:K0:n529nYeJyZAnk/E7YHZ3tnfyNtS6LGCu/l+pFeZLr2cQyYTL07U oTfmgK825V400bxPQqhkC4Glln4eAhNpajJRiCm8oRyDWQst2druhszKXNh+m+7WhtI7Vdv PgqRDtK60cZr1KR+5QvNuKbcUaiEdS95AxJWXPSDySKMYO3Sj9DPQTO6fEpUNzLqunvp7sz f0C2kLAFPNeaqRRMpfpLQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.19 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:161607 Archived-At: >> (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? Yes. IIRC this would otherwise show some temporary buffer instead. >> (setq window-state-put-stale-windows >> (cons window window-state-put-stale-windows)))) > > AKA (push window window-state-put-stale-windows) Better, yes. >> 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 forgot. We could also delete the frame when `window-deletable-p' returns 'frame. > I like this. Please fix it up and install it. martin