Subject: bug#63956: 29.0.91; tex-mode display problem in emacs-29

From: Eli Zaretskii <[email-masked]>
Date: Mon, 12 Jun 2023 14:49:05 +0300

> From: Jeff Norden <[email-masked]>
> Date: Sun, 11 Jun 2023 15:12:08 -0500
> Cc: [email-masked], [email-masked], [email-masked]
> 
> On Sun, Jun 11, 2023 at 1:14 PM Eli Zaretskii wrote:
> > ...
> > > Using -tex-shell-buffer-action for a docview buffer is perhaps a bit
> > > odd
> >
> > You could be right, but I couldn't find any callers of that function,
> > so it was hard for me to reason about that specific case.  Stefan,
> > since you introduced tex-cmd-doc-view into tex-mode.el, could you take
> > a look and tell whether using display-tex-shell-buffer-action in its
> > default value there makes sense?  If not, what would be a better
> > default?
> 
> Took me a bit to figure that out.  Choosing the docview option from
> `tex-compile' results in pre-pending "tex-cmd-" to "doc-view" and then
> calling `tex-cmd-doc-view', which simply opens the pdf file (in
> docview mode) with pop-to-buffer.

OK, thanks.  But did you see any difference between doing this the way
Emacs 28 did (without 2nd argument to pop-to-buffer) and the way the
code now does on the emacs-29 branch?  IOW, does this scenario produce
reasonable results after my recent changes?

> The other tex-compile commands that
> preview the document do so by running an external program such as
> ghostview or xdvi.  That is why I was thinking that opening in a new
> frame might be appropriate.
> 
> I've never used tex-compile, and I wonder if it gets much use in
> general.  One of the ideas I was thinking of was adding it as a
> sub-menu of the TeX menubar entry, which would make it easier to use.
> Another thing, which I now realize is already listed as a 'fixme' item
> in tex-mode.el, is to check that, e.g., the corresponding pdf file is
> up to date (newer than the tex source) before previewing it.

Stefan, your comments on this, and in particular on the
tex-cmd-doc-view function, will be appreciated.