From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: master 432c1aa: Use `pop-to-buffer-same-window' in `project-eshell' Date: Sat, 20 Mar 2021 23:37:40 +0100 Message-ID: References: <833481ce-5f13-77d5-deef-8d9f0c51cdd4@yandex.ru> <1BE350C3-A516-4752-8997-91C252F7E9AD@thornhill.no> <80a81c94-ebc6-6b07-5aee-81adee0ff33b@yandex.ru> <484a46c1-2485-4d9d-e2e4-c45849307b52@yandex.ru> <3f0d7844-a7a1-1e0e-1768-024e3c5567fe@yandex.ru> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34892"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , Simen =?utf-8?Q?Heggest=C3=B8yl?= , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 20 23:38:50 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNkF6-0008xA-HE for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Mar 2021 23:38:48 +0100 Original-Received: from localhost ([::1]:36298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNkF5-0006Cc-FP for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Mar 2021 18:38:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNkE9-0005c1-Df for emacs-devel@gnu.org; Sat, 20 Mar 2021 18:37:49 -0400 Original-Received: from out0.migadu.com ([2001:41d0:2:267::]:17234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNkE5-0007kL-Hu for emacs-devel@gnu.org; Sat, 20 Mar 2021 18:37:49 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1616279861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=B/ht58JjE8M/C3XTV/tMSi0xVPhGNuGgXFnUO5ZQHlg=; b=GiAYVgwaetsai/p2Pn5dKMjhUN0MvSuYjI9TICny/+PFONKRc9hSAXMML0T9iBPunJsYiP Oc5smFgLqyHPk9hV5bFOAVrWuiqF2qcrId23X7B8PRmiE6/hm5hZiVjQK8JPeoSlSTdMOi oNuK32UsAADYNoCUkhm/gRCiMTJ6eJKZfR+vaZPR1f2s9jVNxa55slNmV+Uhi/qScPv8q3 0r5kk6v9SrrSkiViuZM60FogXUGqlbP/+OZdR2r05y2+HoEI00Hv87hc1rzrG9grQHVEKB J/cbfiJlWNAxqpXaTGzeZHqz9TMqSY/IU5tRP6bv8hSY57nqNDHvtXetazb6xA== In-Reply-To: <3f0d7844-a7a1-1e0e-1768-024e3c5567fe@yandex.ru> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: theo@thornhill.no Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=theo@thornhill.no; helo=out0.migadu.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:266678 Archived-At: --=-=-= Content-Type: text/plain Dmitry Gutov writes: > On 20.03.2021 23:51, Theodor Thornhill wrote: >> Would this change need a news entry? > > I think so. In the "Incompatible Editing Changes" section. There :) -- Theo --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Use-pop-to-buffer-same-window-for-shell.patch >From c02866f883c6a893617fced03c499f80b4010007 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Sat, 20 Mar 2021 23:36:29 +0100 Subject: [PATCH] Use pop-to-buffer-same-window for shell * lisp/progmodes/project.el (project-shell): Behave the same way as 'M-x project-eshell'. * lisp/shell.el (shell): Behave the same way as 'M-x eshell'. * etc/NEWS: Add news entry describing the change. --- etc/NEWS | 3 +++ lisp/progmodes/project.el | 2 +- lisp/shell.el | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index c602166397..2a87b82454 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2300,6 +2300,9 @@ since the latter uses 'M-s' as a prefix key of the search prefix map. ** 'vc-print-branch-log' shows the change log for BRANCH from its root directory instead of the default directory. +** 'project-shell' and 'shell' now uses 'pop-to-buffer-same-window' +This is to keep the same behavior as eshell has. + * Incompatible Lisp Changes in Emacs 28.1 diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index bd552c917a..b6a886f731 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -911,7 +911,7 @@ if one already exists." "-shell*")) (shell-buffer (get-buffer default-project-shell-name))) (if (and shell-buffer (not current-prefix-arg)) - (pop-to-buffer shell-buffer) + (pop-to-buffer-same-window shell-buffer) (shell (generate-new-buffer-name default-project-shell-name))))) ;;;###autoload diff --git a/lisp/shell.el b/lisp/shell.el index 53f5d0b6f1..7f4ca76547 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -743,7 +743,7 @@ Make the shell buffer the current buffer, and return it. (current-buffer))) ;; The buffer's window must be correctly set when we call comint ;; (so that comint sets the COLUMNS env var properly). - (pop-to-buffer buffer) + (pop-to-buffer-same-window buffer) (with-connection-local-variables ;; On remote hosts, the local `shell-file-name' might be useless. -- 2.24.3 (Apple Git-128) --=-=-=--