GNU bug report logs - #73854
29.4; tex-mode: unexpected and inconsistent behaviour of `tex-compile`, `tex-file`, and `tex-view`

Previous Next

Package: emacs;

Reported by: Thalis Charakas <thales1 <at> protonmail.com>

Date: Thu, 17 Oct 2024 18:38:02 UTC

Severity: normal

Found in version 29.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 73854 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: thales1 <at> protonmail.com, Stephen Berman <stephen.berman <at> gmx.net>,
 73854 <at> debbugs.gnu.org
Subject: Re: bug#73854: 29.4; tex-mode: unexpected and inconsistent
 behaviour of `tex-compile`, `tex-file`, and `tex-view`
Date: Sat, 19 Oct 2024 10:28:52 -0400
>> 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)
>> 
>> But I'm not familiar with the tex-mode.el code and don't know if this
>> change might have unwanted consequences (though it seems prima facie
>> safe).
>
> Stefan, do you agree with this fix?

No objections here.
Personally, I use `C-c C-c` to view the PDF (i.e. `C-c C-c` first to
compile the TeX file, then a second time to view the result).

So, maybe the patch below would also help.


        Stefan


diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 6fc49800018..f27bd1620e1 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -2212,6 +2212,7 @@ tex-compile-commands
      t "%r.dvi")
     ("xdvi %r &" "%r.dvi")
     ("\\doc-view \"%r.pdf\"" "%r.pdf")
+    ("evince %r.pdf &" "%r.pdf")
     ("xpdf %r.pdf &" "%r.pdf")
     ("gv %r.ps &" "%r.ps")
     ("yap %r &" "%r.dvi")





This bug report was last modified 190 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.