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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 08 Jun 2023 21:34:09 +0300

> From: Sam Steingold <[email-masked]>
> Date: Thu, 08 Jun 2023 13:44:40 -0400
> Posted-To: gmane.emacs.bugs
> 
> > Adding Sam, who made these changes in tex-mode.el.
> 
> Eli, you sent your message to the amazon.com address. Why?

Because that's what appears in Git:

  commit 18b680cfd177e877991be2bd70ead628bbdc0aa0
  Author:     Sam Steingold <[email-masked]>
  AuthorDate: Tue Dec 28 17:27:41 2021 -0500
  Commit:     Sam Steingold <[email-masked]>
  CommitDate: Tue Dec 28 17:28:49 2021 -0500

      Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action'

      * lisp/window.el (display-comint-buffer-action): New `defcustom`,
      defaults to 'display-buffer-same-window' for backward compatibility.
      * lisp/cmuscheme.el (run-scheme, switch-to-scheme): Pass
      'display-comint-buffer-action' to 'pop-to-buffer' instead
      of using 'pop-to-buffer-same-window'.
      * lisp/eshell/eshell.el (eshell): Likewise.
      * lisp/shell.el (shell): Likewise.
      * lisp/org/ol-eshell.el (org-eshell-open): Likewise.
      * lisp/progmodes/inf-lisp.el (inferior-lisp): Likewise.
      * lisp/progmodes/project.el (project-shell, project-eshell): Likewise.
      * lisp/textmodes/tex-mode.el (tex-display-shell, tex-compile-default)
      (tex-recenter-output-buffer): Pass 'display-comint-buffer-action'
      to 'pop-to-buffer'.

> The commit is tagged with my correct gnu.org address.

It isn't see above.

> Please only use [email-masked] for all communications.

Sorry, I cannot afford proofreading every address I copy from the Git
logs.  I simply don't have that kind of time.

> >  Sam, any comments?
> 
> I do not use `tex-buffer', but C-c C-f (which runs the command
> `tex-file') does exactly what it should - creates a new window showing
> `*tex-shell*'. Moreover, I just tried C-c C-b (which runs the command
> `tex-buffer') and it created a new `*tex-shell*' window too (or re-used
> an existing one) without replacing the window that shows my LaTeX.
> 
> When I made the change, I was trying to fix
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52467 (re-use the existing
> `*tex-shell*' window) and I think I did.
> 
> Jeff, could you please reproduce the issue in `emacs -Q`?

I tried "M-x tex-buffer RET" in "emacs -Q", and I see what Jeff
reports.  Are you sure you don't have any customizations that get in
the way?  Or maybe post the exact sequence of commands you tried?