help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MY window tree!


From: Juanma Barranquero
Subject: Re: MY window tree!
Date: Mon, 15 Jan 2007 15:56:45 +0100

On 1/15/07, Lennart Borgman (gmail) <lennart.borgman@gmail.com> wrote:

I have actually changed that to just change the 'window property of the
overlays. No overlays are normally copied any more.

Ah, good.

If the window object
that the 'window properties points to is not a valid window any more
then I just replace that value with a pointer to the new window that
have replaced the old one.

I think the right thing to do would be a bit more complicate:

1) search every displayed buffer and make a list of all overlays
associated to windows, and which windows are they associated to (one
list for window, I suppose).
2) do your mumbo-jumbo with windows
3) determine which window corresponds to every buffer now
4) process the lists of 1) above and modify only those overlays that
pointed to a non-alive windows W1 that corresponds now to W2.

All this because there may be other valid reasons why a buffer
contains overlays with 'window properties pointing to a dead window.
You don't want them suddenly being visible in the wrong window, do
you?

I guess that for most cases this will be sufficient. But there can still
be cases where a mode (or some other code) have a persisting pointer to
a window object. I can not replace this pointers.

Of course.

I would suspect that this situation is not very common, but I am not
sure. I am not aware of any such case at all so please tell me so I can
get a better picture of this.

I'm no aware either. I'm just pointing out that there's a reason this
hasn't been done earlier in elisp :)

                   /L/e/k/t/u




reply via email to

[Prev in Thread] Current Thread [Next in Thread]