preview-latex keeps failing on the first run reddit / emacs ---------------------------------------------------------------------- cuntymccuntlicker · 2022-08-11 02:01 Whenever I open emacs for the first time and start editing a tex file, I will try to preview the buffer using C-c C-p C-b. Invariably, every time I do this, I get the following error: dvips: DVI file can't be opened: _region_.dvi: No such file or directory DviPS sentinel: Opening input file: No such file or directory However, when I run the command a second time, it works fine. I imagine that maybe there is some race condition where we are requesting info from a file that has not been created yet, but which is created by the time I re-run the command. Has someone else run into this error who can help me diagnose it? ---------------------------------------------------------------------- pathemata · 2022-08-11 13:17 I think I had this problem, and It was related to using xelatex. Can you check which engine are you using? ---------------------------------------------------------------------- cuntymccuntlicker · 2022-08-11 17:17 I am using pdflatex, but maybe what you did to fix your problem can help.