emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-29 bdb0bc2b4e4: Fix tex-mode display-buffer issues


From: Robert Pluim
Subject: Re: emacs-29 bdb0bc2b4e4: Fix tex-mode display-buffer issues
Date: Mon, 12 Jun 2023 17:57:00 +0200

>>>>> On Mon, 12 Jun 2023 17:35:35 +0300, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Cc: Michael Albinus <michael.albinus@gmx.de>,  emacs-devel@gnu.org
    >> Date: Mon, 12 Jun 2023 16:01:46 +0200
    >> 
    Eli> Sorry, I have no idea what this failure means.  In particular, the
    Eli> value is correct for the defcustom, and works in practice, and also
    Eli> fits the type of the defcustom (AFAICT).
    >> 
    >> Are you sure?

    Eli> Sure about which part?

About it fitting the type of the defcustom. Since the current value
works for you, it appears the code is more lenient than the defcustom
type indicates.

    Eli> Once again, if you see the problem, feel free to fix it, and thanks.

The minimal fix would be:

diff --git a/lisp/window.el b/lisp/window.el
index 78b0787abdb..16f16a75418 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -8776,7 +8776,7 @@ display-comint-buffer-action
   :group 'windows
   :group 'comint)
 
-(defcustom display-tex-shell-buffer-action 'display-buffer-in-previous-window
+(defcustom display-tex-shell-buffer-action '(display-buffer-in-previous-window)
   "`display-buffer' action for displaying TeX shell buffers."
   :type display-buffer--action-custom-type
   :risky t

Although if we went by analogy to `display-comint-buffer-action', it
would have to be this:

diff --git a/lisp/window.el b/lisp/window.el
index 78b0787abdb..0213023e495 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7575,6 +7575,13 @@ display-buffer--same-window-action
 Specifies to call `display-buffer-same-window'.")
 (put 'display-buffer--same-window-action 'risky-local-variable t)
 
+(defvar display-buffer--in-previous-window-action
+  '(display-buffer-in-previous-window
+    (inhibit-same-window . t))
+  "A `display-buffer' action for displaying in the previous window.
+Specifies to call `display-buffer-in-previous-window'.")
+(put 'display-buffer--in-previous-window-action 'risky-local-variable t)
+
 (defvar display-buffer--other-frame-action
   '((display-buffer-reuse-window
      display-buffer-pop-up-frame)
@@ -8776,7 +8783,7 @@ display-comint-buffer-action
   :group 'windows
   :group 'comint)
 
-(defcustom display-tex-shell-buffer-action 'display-buffer-in-previous-window
+(defcustom display-tex-shell-buffer-action 
display-buffer--in-previous-window-action
   "`display-buffer' action for displaying TeX shell buffers."
   :type display-buffer--action-custom-type
   :risky t


Robert
-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]