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

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

Re: MY window tree!


From: martin rudalics
Subject: Re: MY window tree!
Date: Mon, 15 Jan 2007 23:44:50 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> 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).





reply via email to

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