diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 6fc49800018..acb5bb4b860 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -2530,6 +2530,7 @@ tex-compile (if (tex-shell-running) (tex-kill-job) (tex-start-shell)) + (setq tex-print-file (expand-file-name (tex-main-file))) (tex-send-tex-command cmd dir)))) (defun tex-start-tex (command file &optional dir)