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 23:44:50 +0100 Message-ID: <45AC03E2.5080109@gmx.at> References: <45A8B034.8020301@gmx.at> <45AA17CE.9050009@gmail.com> <45AA6B59.30203@gmx.at> <45AAA21C.6090505@gmail.com> <45AAB98F.8060404@gmail.com> <45AB2CDB.1040207@gmx.at> <45AB7C99.6050002@gmail.com> <45AB8B1F.7010408@gmail.com> <45AB92A8.7030300@gmail.com> <45ABB942.9070407@gmx.at> <45ABC474.3010208@gmail.com> <45ABD474.9040206@gmx.at> <45ABE387.9010306@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 1168901112 8731 80.91.229.12 (15 Jan 2007 22:45:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Jan 2007 22:45:12 +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 23:45:07 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 1H6aZZ-0003km-4T for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 23:45:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6aZZ-0004Tp-2Q for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 17:45:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6aZM-0004TD-DD for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 17:44:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6aZL-0004Ss-Mo for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 17:44:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6aZL-0004So-IV for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 17:44:47 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1H6aZL-0003ew-2V for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 17:44:47 -0500 Original-Received: (qmail invoked by alias); 15 Jan 2007 22:44:45 -0000 Original-Received: from N793P028.adsl.highway.telekom.at (EHLO [62.47.43.28]) [62.47.43.28] by mail.gmx.net (mp013) with SMTP; 15 Jan 2007 23:44:45 +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: <45ABE387.9010306@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:40345 Archived-At: > If not so, then do I not have to look at all overlays in all buffers? You should look only at the overlays of buffers whose windows have "changed". That is, all buffers where a ovlwin-window association exists such that window displays the buffer. I think that after running winsav to its end you have four cases: The window existed before and exists now. Ignore it. It's the same window and any overlays referencing it before still reference it. The window did not exist before but exists now. Since you do not arbitrarily create new windows there must be a ovlwin-window association and the associated buffer's overlays may have to be updated. The window existed before and doesn't exist now (probably because it was discarded during splitting). Ignore it. Any overlay referencing that window won't be displayed in any other window. The window didn't exist before and doesn't now. Ignore it trivially. Note: An existing buffer cannot have an overlay referencing a window you create. > I do not know if this is actually a problem, but if it is then it is a > good point in favor for a solution in C. However I do not expect the > functions in winsav.el to be called very frequently. Initially you didn't want to bother about overlays at all, now you want to check overlays in all buffers. Initially you wanted to convince me that you can do it in Lisp, now that you have nearly done it, you favor a solution in C. Alas, this will be hardly ever done in C, the window related code is too hairy. Yours could be perfect (if you just removed the make-overlay stuff).