[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61102: 28.1; with-selected-window/save-window-excursion calls buffer
From: |
martin rudalics |
Subject: |
bug#61102: 28.1; with-selected-window/save-window-excursion calls buffer-list-update-hook only once |
Date: |
Fri, 3 Feb 2023 09:33:27 +0100 |
> Thanks! I should have clarified that I am developing a package that
> keeps track of the currently active window and executes certain code
> when the selected window changes (similar to auto-dim-other-buffers,
> if you are aware of it). I can't control what the user of my package
> does, in terms of combining `save-window-excursion` with
> `with-selected-window` or otherwise, so I am looking for a solution
> that works regardless
'window-selection-change-functions' (or 'window-state-change-hook')
should handle that. If these don't work for you, please tell us why.
> I guess my only option is have an idle timer that checks if the
> current selected window is different compared to the last time a
> `buffer-list-update-hook` was called.
I rather suppose you want to check if it is different to that of the
last time your package did something particular to it.
martin