all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: dal-blazej--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 52688@debbugs.gnu.org
Subject: bug#52688: 29.0.50; term / use display-buffer
Date: Mon, 20 Dec 2021 23:55:22 +0100	[thread overview]
Message-ID: <87tuf27up1.fsf@onenetbeyond.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]


The function 'term' use actually 'switch-to-buffer'. I think it's better
to let users decide where the window will appear with
'display-buffer-alist' or 'display-buffer-base-action', and so, to use
'display-buffer'.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: use_display-buffer --]
[-- Type: text/x-diff, Size: 829 bytes --]

From ae03d8bb6e10027334c2dd6c37bd0e8faf74932c Mon Sep 17 00:00:00 2001
From: Dal Blazej <dal-blazej@onenetbeyond.org>
Date: Mon, 20 Dec 2021 23:48:11 +0100
Subject: [PATCH] Use display-buffer with term* lisp/term.el (term):

* list/term.el (term): Let users decides which window 'term' will take.
---
 lisp/term.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/term.el b/lisp/term.el
index 698bef08b2..5374815c69 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1532,7 +1532,7 @@ commands to use in that buffer.
 					     shell-file-name))))
   (set-buffer (make-term "terminal" program))
   (term-char-mode)
-  (switch-to-buffer "*terminal*"))
+  (display-buffer "*terminal*"))
 
 (defun term-exec (buffer name command startfile switches)
   "Start up a process in buffer for term modes.
-- 
2.30.2


             reply	other threads:[~2021-12-20 22:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 22:55 dal-blazej--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-12-21 10:48 ` bug#52688: 29.0.50; term / use display-buffer Lars Ingebrigtsen
     [not found]   ` <87ee65svov.fsf@onenetbeyond.org>
2021-12-22 12:01     ` Lars Ingebrigtsen

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=87tuf27up1.fsf@onenetbeyond.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=52688@debbugs.gnu.org \
    --cc=dal-blazej@onenetbeyond.org \
    /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.