unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#52878: [PATCH] Fix display-comint-buffer-action default behavior
@ 2021-12-29 18:38 Morgan.J.Smith
  2021-12-29 20:35 ` Stefan Kangas
  2022-01-06 17:16 ` martin rudalics
  0 siblings, 2 replies; 3+ messages in thread
From: Morgan.J.Smith @ 2021-12-29 18:38 UTC (permalink / raw)
  To: 52878; +Cc: Morgan Smith

From: Morgan Smith <Morgan.J.Smith@outlook.com>

* lisp/window.el (display-comint-buffer-action): Make it an alist.
---

This is my first real contribution to Emacs :)

My copyright papers are all good (not that it matters for this).

The recent change that added display-comint-buffer-action does not do what it was supposed to.  Since it is not a list, when it gets passed to display-buffer, display-buffer ignores the value.

I'm not 100% I did everything right, but I looked at gdb-display-buffer-other-frame-action for reference and verified the behavior of the change myself.


 lisp/window.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/window.el b/lisp/window.el
index d75dd9931b..34b2d0c78a 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7474,9 +7474,9 @@ display-buffer-base-action
   :version "24.1"
   :group 'windows)
 
-(defcustom display-comint-buffer-action 'display-buffer-same-window
-  "The action to display a comint buffer."
-  :type 'display-buffer--action-function-custom-type
+(defcustom display-comint-buffer-action '((display-buffer-same-window))
+  "`display-buffer' action for displaying comint buffers."
+  :type display-buffer--action-custom-type
   :risky t
   :version "29.1"
   :group 'windows
-- 
2.34.0






^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#52878: [PATCH] Fix display-comint-buffer-action default behavior
  2021-12-29 18:38 bug#52878: [PATCH] Fix display-comint-buffer-action default behavior Morgan.J.Smith
@ 2021-12-29 20:35 ` Stefan Kangas
  2022-01-06 17:16 ` martin rudalics
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2021-12-29 20:35 UTC (permalink / raw)
  To: Morgan.J.Smith; +Cc: 52878

Morgan.J.Smith@outlook.com writes:

> This is my first real contribution to Emacs :)

Congratulations, and welcome here!

> The recent change that added display-comint-buffer-action does not do
> what it was supposed to.  Since it is not a list, when it gets passed
> to display-buffer, display-buffer ignores the value.

I think we will see what will happen to that recent change.  There is
even talk about reverting it on emacs-devel, but nothing conclusive as
of yet.  So be aware that your patch might have to wait until that
discussion is concluded.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#52878: [PATCH] Fix display-comint-buffer-action default behavior
  2021-12-29 18:38 bug#52878: [PATCH] Fix display-comint-buffer-action default behavior Morgan.J.Smith
  2021-12-29 20:35 ` Stefan Kangas
@ 2022-01-06 17:16 ` martin rudalics
  1 sibling, 0 replies; 3+ messages in thread
From: martin rudalics @ 2022-01-06 17:16 UTC (permalink / raw)
  To: Morgan.J.Smith, 52878

A minor issue: The "right" initial value should probably be

'(display-buffer-same-window . ((inhibit-same-window . nil)))

since otherwise

(setq display-buffer-base-action
       '(nil . ((inhibit-same-window . t))))

would inhibit using the same window.

martin





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-06 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-29 18:38 bug#52878: [PATCH] Fix display-comint-buffer-action default behavior Morgan.J.Smith
2021-12-29 20:35 ` Stefan Kangas
2022-01-06 17:16 ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).