From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>,
73854@debbugs.gnu.org, thales1@protonmail.com
Subject: bug#73854: 29.4; tex-mode: unexpected and inconsistent behaviour of `tex-compile`, `tex-file`, and `tex-view`
Date: Mon, 21 Oct 2024 11:22:02 +0200 [thread overview]
Message-ID: <87o73dyfnp.fsf@gmx.net> (raw)
In-Reply-To: <jwvcyjw9nki.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 19 Oct 2024 10:28:52 -0400")
On Sat, 19 Oct 2024 10:28:52 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>> 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")
Indeed, with a suitable entry for viewing a PDF, typing `C-c C-c' twice
does the job. In my case, however, a suitable entry is not evince,
since I don't have that program installed here, but I do have mupdf and
with an entry for it, `C-c C-c' calls it and the PDF is displayed. So
this raises the question of whether tex-compile-commands should be
enhanced with all known free software PDF viewers, or, more
maintainer-friendly, turned into a defcustom, so users can just added
their preferred entries. But that's a complementary issue to the
present bug report, since without my patch for tex-compile even with a
suitable entry in tex-compile-commands, `C-c C-v' (tex-view) still
complains "No appropriate ‘.dvi’ file could be found" and does not call
the program specified by tex-dvi-view-command to display the PDF. So
should I just go ahead and install my patch? And if so, to master or to
emacs-30 (which has the same issue)?
Steve Berman
next prev parent reply other threads:[~2024-10-21 9:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 18:36 bug#73854: 29.4; tex-mode: unexpected and inconsistent behaviour of `tex-compile`, `tex-file`, and `tex-view` Thalis Charakas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19 9:54 ` Eli Zaretskii
2024-10-19 11:31 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19 11:54 ` Eli Zaretskii
2024-10-19 14:28 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-21 9:22 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-10-21 9:55 ` Eli Zaretskii
2024-10-21 10:53 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-21 11:59 ` Eli Zaretskii
2024-10-21 13:22 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-21 13:33 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-21 13:38 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o73dyfnp.fsf@gmx.net \
--to=bug-gnu-emacs@gnu.org \
--cc=73854@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=stephen.berman@gmx.net \
--cc=thales1@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.