From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.help Subject: Re: MY window tree! Date: Sun, 14 Jan 2007 10:35:33 +0100 Message-ID: <45A9F965.4080007@gmail.com> References: <45A8B034.8020301@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168767358 27024 80.91.229.12 (14 Jan 2007 09:35:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 Jan 2007 09:35:58 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, michael@cadilhac.name Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 14 10:35:54 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H61mJ-0005Ff-Fe for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Jan 2007 10:35:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H61mJ-0005Zk-FQ for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Jan 2007 04:35:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H61m5-0005Zf-He for help-gnu-emacs@gnu.org; Sun, 14 Jan 2007 04:35:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H61m3-0005Yx-KY for help-gnu-emacs@gnu.org; Sun, 14 Jan 2007 04:35:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H61m3-0005Yu-19 for help-gnu-emacs@gnu.org; Sun, 14 Jan 2007 04:35:35 -0500 Original-Received: from [80.76.149.212] (helo=ch-smtp01.sth.basefarm.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H61m2-0003ke-IG for help-gnu-emacs@gnu.org; Sun, 14 Jan 2007 04:35:34 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:63119 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1H61m0-0003xj-3N; Sun, 14 Jan 2007 10:35:33 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) Original-To: martin rudalics In-Reply-To: <45A8B034.8020301@gmx.at> X-Antivirus: avast! (VPS 0703-0, 2007-01-13), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1H61m0-0003xj-3N. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1H61m0-0003xj-3N c3c6915fe8c941f25e844ec26d344b1e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40289 Archived-At: martin rudalics wrote: > > I've been playing around with window-tree to do the following : > > - On M-x foo, a window is created on the extreme left of the frame, > > containing a buffer called *Bar*, > > - On M-x foo again, with the buffer *Bar* on the left, this window is > > removed. > > > > Problem is, this can't be done with a simple split. So my first idea > > was to reduce the frame to one window, split it: left would be *Bar* > > and restore the window-tree in the right part. > > > > Of course, this can't work, because if I use delete-other-windows, the > > windows are ... deleted. So, can't be restored. > > > > I can't find a way to do this simply, and I wonder if there is :-) > > Don't wonder: You first have to save the window-list of the frame > including all windows' edges and identities. Next you have to create the > *Bar* window with the intended width and split the window on the right > in the way listed by the saved window-list, adjust the vertical dividers > proportionally to what you had before (there's always a chance that a > window drops below the minimum width now) and assign any window-local > overlays the identity of their new window. In addition there might be > dedicated windows and other window-local properties as well ... > > I once struggled a lot with the much simpler problem of a window > configuration like > > ---------- > | | | > |1| 2 | > | | | > ---------- > > I wanted to transform into > > ---------- > |1| 2 | > |----------| > | 3 | > ---------- > > If you come up with a solution to your problem I'd definitely want to > hear about it ;-) I have uploaded a preliminary version of winsav.el to http://ourcomments.org/Emacs/DL/elisp/test/winsav.el