On 6/27/22 12:54, Eli Zaretskii wrote: > Your test calls with-current-buffer-window, which calls > temp-buffer-window-setup, which inhibits modification hooks: Yup, that's it! If I set `inhibit-modification-hooks' back to nil then it works. Thank you. I thought I had a `(should (null inhibit-modification-hooks))` at some point in the past to rule that out, but I must not have had that inside the `with-current-buffer-window'. Perhaps the documentation should be updated to indicate that the modification hooks are inhibited? I can cook up a patch.