From 8ebb1a90ef7f8e5c05f0d20480c38177468f365f Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Mon, 21 Oct 2024 12:50:53 +0200 Subject: [PATCH] Let 'tex-view' show PDFs made without a DVI (bug#73854) * lisp/textmodes/tex-mode.el (tex-print-file): Update doc string to mention 'tex-compile'. (tex-compile-commands): Add entries for 'evince' and 'mupdf'. (tex-compile): Set 'tex-print-file'. (cherry picked from commit 1f8fbae8df764e9d24f1b824de7369d82e36abae) --- lisp/textmodes/tex-mode.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index f2787936599..8f10f37b957 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -310,7 +310,7 @@ Should be a simple file name with no extension or directory specification.") (defvar tex-print-file nil "File name that \\[tex-print] prints. -Set by \\[tex-region], \\[tex-buffer], and \\[tex-file].") +Set by \\[tex-region], \\[tex-buffer], \\[tex-file] and \\[tex-compile].") (defvar tex-mode-syntax-table (let ((st (make-syntax-table))) @@ -2212,6 +2212,8 @@ If NOT-ALL is non-nil, save the `.dvi' file." t "%r.dvi") ("xdvi %r &" "%r.dvi") ("\\doc-view \"%r.pdf\"" "%r.pdf") + ("evince %r.pdf &" "%r.pdf") + ("mupdf %r.pdf &" "%r.pdf") ("xpdf %r.pdf &" "%r.pdf") ("gv %r.ps &" "%r.ps") ("yap %r &" "%r.dvi") @@ -2530,6 +2532,7 @@ Only applies the FSPEC to the args part of FORMAT." (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) -- 2.39.2