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: Re: MY window tree! Date: Mon, 15 Jan 2007 08:27:23 +0100 Message-ID: <45AB2CDB.1040207@gmx.at> 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> 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 1168881385 11875 80.91.229.12 (15 Jan 2007 17:16:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Jan 2007 17:16:25 +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:16:22 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 1H6VJx-0002Ld-UR for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 18:08:33 +0100 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1H6VJ1-00008n-8h for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 18:07:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6MaS-0001Qg-DZ for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 02:49:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6MaA-0001Ow-Ro for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 02:48:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6Ma4-0001Lg-9A for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 02:48:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6Ma4-0001Lb-1l for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 02:48:36 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1H6Ma3-0008Kt-2B for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 02:48:35 -0500 Original-Received: (qmail invoked by alias); 15 Jan 2007 07:48:33 -0000 Original-Received: from N855P015.adsl.highway.telekom.at (EHLO [62.47.50.207]) [62.47.50.207] by mail.gmx.net (mp020) with SMTP; 15 Jan 2007 08:48:33 +0100 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: "Lennart Borgman (gmail)" In-Reply-To: <45AAB98F.8060404@gmail.com> 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:40315 Archived-At: > 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"? (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))) (3) I don't understand yet what happens when a particular window can't be split because it's too small. (4) I think `window-start' should be preserved unless this would make `window-point' disappear. (5) A hook which passes old / new window arguments for each pair where a change took place would be urgently needed.