The problem with `window-configuration-change-hook` is that it isn't called all the times we would need it. For example, it's not called when you do `other-window` via `C-x o`. -Steven On Wed, Apr 3, 2013 at 3:13 PM, Stefan Monnier wrote: > > We could add overlays to every buffer, and whenever you change windows, > > remove the overlay from the current buffer and add it back to the > previous > > buffer. > > Auto-adding the overlays can be done in window-configuration-change-hook. > We're talking about N overlays per buffer where N is small (it's number of > windows where the buffer is displayed), so there's no performance > problem there. > > > Or, we could have it reversed. We could only have an overlay on the > current > > buffer at any given time, and give it the window of (selected-window), > and > > keep updating these any time you change buffers or windows. > > That would be a lot simpler, indeed, but I think it will be difficult > to make it look good. > > > Stefan > > >