On Mon, May 01, 2023 at 03:04:36PM +0800, Hongyi Zhao wrote: [...] > Another important clue, when the problem occurs, I noticed the > following in the *Messages* buffer: > > font-lock-compile-keywords: Font-lock trying to use keywords > before setting them up > > On the other hand, the correct open TeX file didn't trigger the above message. I don't even know what that message means: hopefully someone more expert in Emacs things can tell us. On the other hand, I can't imagine that this thing causes the file not being loaded. What happens when you click on the complex TeX file and then list the buffers in your Emacs (C-x b)? Does the buffer appear on the list? That would mean that the file is loaded, but Emacs still shows you the *scratch* buffer. Otherwise, the file doesn't get loaded at all. This might give hints to find the problem. Cheers -- t