> How does this relate to if the buffer was DISPLAYED in the window tree
> (ie if window-buffer had that value for any window in the window tree)
> at the moment winsav-get-window-tree was called?
If I understand correctly you save the identity of such a buffer via
(list (window-buffer tree)
hence you have an entry for that buffer in the saved window tree. Let's
call the buffer B and the window W. Suppose now you eventually want to
`winsav-put-window-tree' the tree you saved. When you create the new
window, say N, corresponding to W you make it display B (provided B
still exists). Next you check all windows in the new window tree. When
you check N you know that it (1) displays buffer B, and (2) is a replica
of window W. Now you scan B and for any overlay in B referencing W you
make the overlay reference N unless W is still alive. All other
overlays in B are ignored. Where is the problem? Try to describe a
scenario that introduces an inconsistency in my proposal.