From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 10:28:52 -0400 Message-ID: References: <86ed4cl8no.fsf@gnu.org> <87ldykxrba.fsf@gmx.net> <8634ksl34a.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27538"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: thales1@protonmail.com, Stephen Berman , 73854@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 19 16:29:50 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 1t2ASi-00070r-RV for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 16:29:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2ASb-0007eD-Sk; Sat, 19 Oct 2024 10:29:41 -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 1t2ASY-0007e2-H5 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 10:29: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 1t2ASY-0005Fh-8b for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 10:29: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:Date:References:In-Reply-To:From:To:Subject; bh=16rH3agTemgFqREVXJMZAXDQh4BIMXs3BVB3a6yqz6I=; b=nY6ReOi9Ar5GX15h8Qmvz3ax4w8bDIR7Vq6wYVwgaPLKr+1tNbLC6D9An+oFIDDNVGKdMkNcPwnJ4Put1qY9SYnG/VmwO8zGEOt3C033yntAV1Snvb/lbBC70QIsk25K4rRHOyQRILoFh/5FB+PizA5sMgpuOXhMomU+3F+QRghkJ91FkqOWnDqO7gpqe9wOATOULw8izalNLaBP7R4S3cxKs8d/QD/dtpDpTmB8r+TvdBPH/PYR5eKZsaFNvO3c3vLc8xnIEOd60YkZA2ScGfcTB01/jUchHvIakFZtupfmMnDmv7n3vrcFZnG7n62HuCfT11qvmqdmwD+0LPxvjg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2ASv-0003A9-Vd for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 10:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2024 14:30:01 +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.172934817212098 (code B ref 73854); Sat, 19 Oct 2024 14:30:01 +0000 Original-Received: (at 73854) by debbugs.gnu.org; 19 Oct 2024 14:29:32 +0000 Original-Received: from localhost ([127.0.0.1]:44241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2ASR-000393-P7 for submit@debbugs.gnu.org; Sat, 19 Oct 2024 10:29:32 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2ASO-00038n-02 for 73854@debbugs.gnu.org; Sat, 19 Oct 2024 10:29:29 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id F2F068093D; Sat, 19 Oct 2024 10:28:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1729348133; bh=gDdwHSqJT8UTtVCHGC6iClkD3twoAznHdNAvBFgPSlE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Kx4mSzkm49Wgxbuor9WDH8rIva1mUtv6l2vJ7+d1fqwvVah22422LkfdEhzS9SpVU ju9g/mvfDf742Ml99HxYLRRMyzzdZaSy7+Pq0z6v2NA+9O3Oa4a4ApIiovJryrQehZ jEuaD7KOAd11q4V9aJhhBahaHXdNwnqZISt31mR39gSgj/sz66NqrBBdvI1j6mR40r o39RxWvn9+G8B5Sixb0EjE+c8pVMJsGunXuHsNuNCFghaQRoZoB7doAAhm0OOUYDUI z8Vb5c/Ph1sT6J9zV4F33EGGmdRVJY+O/Nmcusy4e+Q2CCx+ptWZ6BCAj6KTKx5h0r pUrWFcWCLFcvQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0515280904; Sat, 19 Oct 2024 10:28:53 -0400 (EDT) Original-Received: from pastel (69-196-161-60.dsl.teksavvy.com [69.196.161.60]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C65E512077C; Sat, 19 Oct 2024 10:28:52 -0400 (EDT) In-Reply-To: <8634ksl34a.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Oct 2024 14:54:29 +0300") 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:293887 Archived-At: >> 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")