> It might not help in the case at hand, but instead of advising > 'select-window' (which won't do the job anyway when a window is > selected directly via select_window) please add your function to > 'buffer-list-update-hook'. Hooking 'select-window' _is_ bad idea, > always. I will try that, even though I'm pretty sure that I already tried this approach in the past and switched back to advising `select-window` but I cannot recall the reason. On 2 May 2018 at 15:47, martin rudalics wrote: > > Any advice on this part? I needed to force the size of windows and > hooking > > `select-window` (via `advice-add`) is apparently not enough to catch all > > the cases. > > It might not help in the case at hand, but instead of advising > 'select-window' (which won't do the job anyway when a window is > selected directly via select_window) please add your function to > 'buffer-list-update-hook'. Hooking 'select-window' _is_ bad idea, > always. > > martin >