From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.help Subject: MY window tree! Date: Sat, 13 Jan 2007 11:11:00 +0100 Message-ID: <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 1168683201 30223 80.91.229.12 (13 Jan 2007 10:13:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 13 Jan 2007 10:13:21 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 13 11:13:18 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 1H5fsx-0005aU-N1 for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Jan 2007 11:13:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H5fsx-0002wl-64 for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Jan 2007 05:13:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H5frx-0002uG-3L for help-gnu-emacs@gnu.org; Sat, 13 Jan 2007 05:12:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H5fru-0002sb-Ic for help-gnu-emacs@gnu.org; Sat, 13 Jan 2007 05:12:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H5frs-0002rO-7g for help-gnu-emacs@gnu.org; Sat, 13 Jan 2007 05:12:08 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1H5fro-0007vo-Pn for help-gnu-emacs@gnu.org; Sat, 13 Jan 2007 05:12:07 -0500 Original-Received: (qmail invoked by alias); 13 Jan 2007 10:12:02 -0000 Original-Received: from N793P010.adsl.highway.telekom.at (EHLO [62.47.43.10]) [62.47.43.10] by mail.gmx.net (mp010) with SMTP; 13 Jan 2007 11:12:03 +0100 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: michael@cadilhac.name X-Y-GMX-Trusted: 0 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:40278 Archived-At: > 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 ;-)