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: Sun, 21 Mar 2021 08:04:13 +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> <83wnu1avg5.fsf@gnu.org> 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="26733"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dgutov@yandex.ru, stefan@marxist.se, simenheg@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 21 08:05:36 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 1lNs9Y-0006qW-Mw for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Mar 2021 08:05:36 +0100 Original-Received: from localhost ([::1]:59978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNs9X-0000zJ-Le for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Mar 2021 03:05:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNs8N-0000a0-NX for emacs-devel@gnu.org; Sun, 21 Mar 2021 03:04:23 -0400 Original-Received: from out1.migadu.com ([2001:41d0:2:863f::]:56847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNs8J-0004eF-Sr; Sun, 21 Mar 2021 03:04:23 -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=1616310254; 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=DPYKeYsJG/CsXs+Uf83IXCAM0oPioDtcdQ9USkH3b+s=; b=iTNcyw1h1Y9tpNPUcARItsqSGqcdfUozLRYukJhfBqZnt3UhSG/DogKPxx0rZcUvaFYW80 0QD5h7YdQNGj8819e7R+PBNhmtNCLlGXi7LTVPMo/XIqBKaTc4WcB5TESHJzOsIcYHPuap PQXLEhoCLRYQM+ur9o+DXi2K+yXJiLQWO7JBHZG8b1mOV+Sy83BKT9mu5rTPcxIXovF1lw dCPImgXzBRM3t5NB/1nLP71/2L0YQ0Zss3XozMR/Lp4xzPFDVch8oL7KOugdW/qZNEdHu5 E7bhvHpkQAtnmO6yp0i+VwxYxOQM26AJ935+UdiNa9IY0e3V+xv+9UfVTsPoeg== In-Reply-To: <83wnu1avg5.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: theo@thornhill.no Received-SPF: pass client-ip=2001:41d0:2:863f::; envelope-from=theo@thornhill.no; helo=out1.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:266687 Archived-At: --=-=-= Content-Type: text/plain Hi, Eli! > "use", in plural. Also, the first line of a NEWS entry should be a > complete sentence, so it should end with a period. > >> +This is to keep the same behavior as eshell has. > > I believe our convention is to use "Eshell", capitalized. > New patch with your comments addressed, hopefully sufficiently :) > Thanks. Thank you :) -- Theo --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Use-pop-to-buffer-same-window-for-shell.patch >From fed04b8ba437043f30132fe362509ebf14ed0588 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Sun, 21 Mar 2021 08:02:28 +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. * lisp/tutorial.el: Use lexical-binding. --- etc/NEWS | 4 ++++ lisp/progmodes/project.el | 2 +- lisp/shell.el | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index c602166397..49a4bb8106 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2300,6 +2300,10 @@ 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 use 'pop-to-buffer-same-window'. +This is to keep the same behavior as Eshell. + * 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) --=-=-=--