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 #8 received at 73854 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thalis Charakas <thales1 <at> protonmail.com>
Cc: 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 12:54:51 +0300
> Date: Thu, 17 Oct 2024 18:36:19 +0000
> From:  Thalis Charakas via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Basically, `tex-view` works, opening Evince, on a compiled .pdf only
> after a .dvi is created.
> 
> Running 'emacs -Q' I evaluate the following in the scratch buffer, to
> make it so that latex is compiled to pdf:
> ```
> (setq tex-print-file-extension ".pdf"
>       tex-dvi-view-command "evince"
>       tex-dvi-print-command "lpr")
> ```
> the last two lines are following the instructions on the description of
> `tex-print-file-extension`.
> 
> I navigate to a simple .tex in an empty directory and press `C-c C-c`
> which is bound by default to `tex-compile`, I press enter, as the
> default is `pdflatex`, and the file compiles, creating a .pdf in the
> directory. After that I press `C-c C-v`, which is bound to `tex-view`
> but Evince does not open, instead I get the message "tex-print: No
> appropriate ‘.dvi’ file could be found. If I press `C-c C-f`
> (`tex-file`) after that, a .dvi file is created, and now `tex-view`
> works, meaning it opens the .pdf with Evince.
> 
> The fact that `tex-view` works on the .pdf only when a .dvi is first
> created seems like a bug.

Thanks.  Can you step with Edebug through tex-print in your case and
try to figure out what happens there that causes the error message?
There's some logic there which is supposed to verify that the current
buffer's print file is up-to-date:

    (if (and (not (equal (current-buffer) tex-last-buffer-texed))
	     (buffer-file-name)
	     ;; Check that this buffer's printed file is up to date.
	     (file-newer-than-file-p
	      (setq test-name (tex-append (buffer-file-name)
                                          tex-print-file-extension))
	      (buffer-file-name)))
	(setq print-file-name-dvi test-name))

Maybe something goes wrong there in your case?

(I don't have the requisite tools installed to try this myself,
sorry.)




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.