On Sun, Apr 30, 2023 at 10:36:17PM +0800, Hongyi Zhao wrote: > Hi here, > > When I double-click on a TeX document to open it, Emacs will show the > scratch window instead of the TeX document window, as shown in the > attachment. Any tips will be appreciated. I think this depends more on your operating system/desktop environment than on Emacs itself. The desktop environment is the one responsible of translating your double click into the invocation of Emacs. It seems that some parameter in this invocation got lost. What OS/desktop environment are you using? Cheers -- t