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: Mon, 15 Jan 2007 14:07:37 +0100 Message-ID: <45AB7C99.6050002@gmail.com> References: <45A8B034.8020301@gmx.at> <45A9F965.4080007@gmail.com> <45AA1382.2030506@gmx.at> <45AA17CE.9050009@gmail.com> <45AA6B59.30203@gmx.at> <45AAA21C.6090505@gmail.com> <45AAB98F.8060404@gmail.com> <45AB2CDB.1040207@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 1168881083 9989 80.91.229.12 (15 Jan 2007 17:11:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Jan 2007 17:11:23 +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 Mon Jan 15 18:11:21 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by lo.gmane.org with esmtp (Exim 4.50) id 1H6VJf-0002CH-0Y for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 18:08:15 +0100 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1H6VJ1-0008SQ-Lx for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 18:07:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6RxQ-0004tj-73 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 08:33:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6Rx5-0004tT-HW for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 08:32:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6Rx2-0004sA-GP for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 08:32:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6Rx2-0004s7-AD for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 08:32:40 -0500 Original-Received: from [80.76.149.213] (helo=ch-smtp02.sth.basefarm.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6RZK-0004nS-M4 for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 08:08:11 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:60563 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1H6RZH-0007Gs-92; Mon, 15 Jan 2007 14:08:08 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) Original-To: martin rudalics In-Reply-To: <45AB2CDB.1040207@gmx.at> X-Antivirus: avast! (VPS 0703-1, 2007-01-15), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1H6RZH-0007Gs-92. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1H6RZH-0007Gs-92 14be9d75ea3ce20ce18bd48a469a3262 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:40299 Archived-At: martin rudalics wrote: > > Saving and restoring properties is rather straightforward. Is there > > still any reason to have this in C? > > I don't care about things like `buffer-display-count' or `use_time', > hence I wouldn't know. I would care, however, about the following: > > > (1) You do > > (newovl (make-overlay start end))) > > but you never delete any overlays AFAICT. Doesn't this mean to get > _two_ overlays (whose properties are mostly identical but for the > window-property) in the same place? What's so problematic about simply > changing the window-property of each affected overlay to "window"? Then the old window that the overlay 'window property pointed to no longer exists there are no problem, but if it does then I think it is best to copy the overlay. I have changed the code to do distinguish those two cases now. See also the comment in Bugs and limitation that I have added to winsav.el now. > (2) The adjusting part doesn't work here yet, that is all windows are > balanced in their heights and widths. I don't understand the code yet > but I can't imagine that it should be necessary to round the size of all > windows, leaf windows should be left alone, I presume. (BTW new-height, > new-size, ..., old-width would be more readable.) > > I tried with trivial code like > > (let ((tree (winsav-get-window-tree))) > (delete-other-windows) > (winsav-restore-window-tree > tree > (split-window (selected-window) nil t))) Resizing is a bit harder than one think at the beginning. I forgot that it must be done iteratively. I have added that now, please try again. > (3) I don't understand yet what happens when a particular window can't > be split because it's too small. I had not try taken care of that problem before. I have tried to do that now. > (4) I think `window-start' should be preserved unless this would make > `window-point' disappear. Seems reasonable. I have tried to fix it. > (5) A hook which passes old / new window arguments for each pair where a > change took place would be urgently needed. I do not see where to put in the hook. Maybe returning a list of window pairs ((old new) ...) would do what you want?