From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <86ed4cl8no.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73854@debbugs.gnu.org To: Thalis Charakas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 19 11:56:03 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t26Bn-0000Dt-Eo for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 11:56:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t26BQ-000233-FR; Sat, 19 Oct 2024 05:55:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t26BO-00022s-Uc for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 05:55:38 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t26BO-0006er-Lm for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 05:55:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=W2Og/jzW0GVttl8fwGEbyk1pnKuUxfe67s8+n0UdEug=; b=O9/K7Wqc2syU6ZBayiLSGeVV69kkfeQqjolvQtXPNqQNzsHciC4/AbRUnrlXjGLrFyfI+XjV1nZjtFrM1cJDN2VQ+kHjHlZw+npgeSENnXWqOGgiU5ShW8B87KequCedHLOjar6lSw8ztDeHV8fTMmizIPbEN2MFybVWCbi80xQP3YcyHpOKB5vI7GwaxKD8HP95CIE6Vdi0bL83TH6dsN0aNMnaAjkjmSWn4hYDsBUUtLC0rHEtUkTmGJB7TkrPG4Hahw6S0+Tnsq6zl+o1CfIxmuKesueUQjJyHhbh4+74BljAJ2wU674pbUZ0QH5spUJH4kiEIZPESdhrUgnQ1w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t26Bm-0006fo-2G for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 05:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2024 09:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73854 X-GNU-PR-Package: emacs Original-Received: via spool by 73854-submit@debbugs.gnu.org id=B73854.172933172625245 (code B ref 73854); Sat, 19 Oct 2024 09:56:02 +0000 Original-Received: (at 73854) by debbugs.gnu.org; 19 Oct 2024 09:55:26 +0000 Original-Received: from localhost ([127.0.0.1]:41499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t26BB-0006Z6-Nq for submit@debbugs.gnu.org; Sat, 19 Oct 2024 05:55:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t26B9-0006Yr-CK for 73854@debbugs.gnu.org; Sat, 19 Oct 2024 05:55:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t26Af-0006Nq-Sy; Sat, 19 Oct 2024 05:54:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=W2Og/jzW0GVttl8fwGEbyk1pnKuUxfe67s8+n0UdEug=; b=nbRQFqNvzmgjQIMx+Rsc gEGT/A+NYUzpgBZyO0hIe1asfX3+A/r/YL+9VML/6yEsUBa4N7n0JBJo8BuYfI3R+BEvcm96uEZHp w4TaanGV0zX2on2rp6gr01D2PZUZqWsHhGIAtBV524dnyqS7I7ujgaehfNJqsN81JKHDKx0HYU3vY qo3oZDpWw+lFDR6PUbqfVHTYzibW1rbg7JpuCMHlactsYSeftKQbHWXCAgr19nFwvuN68lB77Gd2T 6+RTI7A9gC860QOQYD4juau4deIzMNBaM3JoYIjws6bFSpgdX3uWfGw4ubLj852caCnvXwll7ozcq 6UgrP673mat3OQ==; In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293864 Archived-At: > 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" > > 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.)