> Yes, and that lone call is never made in your scenario. > > So I'm no longer sure what problem are we discussing here. > The lone call to insert-file-contents, as in step 5 of my reproduction. Calling insert-file-contents after typing in a file buffer runs the after-change-functions hooks. When these hooks are run, the current buffer's file name is seen to have been temporarily set to nil, which should not be the case. Is this clear?