all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Theodor Thornhill via "Emacs development discussions." <emacs-devel@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dgutov@yandex.ru, stefan@marxist.se, simenheg@gmail.com,
	emacs-devel@gnu.org
Subject: Re: master 432c1aa: Use `pop-to-buffer-same-window' in `project-eshell'
Date: Sun, 21 Mar 2021 08:04:13 +0100	[thread overview]
Message-ID: <m1y2ehm1hu.fsf@Frende-MacBook.lan> (raw)
In-Reply-To: <83wnu1avg5.fsf@gnu.org>

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

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-pop-to-buffer-same-window-for-shell.patch --]
[-- Type: text/x-patch, Size: 2193 bytes --]

From fed04b8ba437043f30132fe362509ebf14ed0588 Mon Sep 17 00:00:00 2001
From: Theodor Thornhill <theo@thornhill.no>
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.
+
 \f
 * 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)


  parent reply	other threads:[~2021-03-21  7:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210308115905.6593.76443@vcs0.savannah.gnu.org>
     [not found] ` <20210308115907.30AD520A10@vcs0.savannah.gnu.org>
2021-03-20  2:06   ` master 432c1aa: Use `pop-to-buffer-same-window' in `project-eshell' Stefan Kangas
2021-03-20 17:04     ` Dmitry Gutov
2021-03-20 17:21       ` Theodor Thornhill
2021-03-20 18:54         ` Dmitry Gutov
2021-03-20 19:29           ` Theodor Thornhill
2021-03-20 20:03             ` Dmitry Gutov
2021-03-20 20:21               ` Theodor Thornhill
2021-03-20 20:29                 ` Dmitry Gutov
2021-03-20 20:33                   ` Theodor Thornhill
2021-03-20 21:08                     ` Dmitry Gutov
2021-03-20 21:51                       ` Theodor Thornhill
2021-03-20 22:29                         ` Dmitry Gutov
2021-03-20 22:37                           ` Theodor Thornhill via Emacs development discussions.
2021-03-21  6:10                             ` Eli Zaretskii
2021-03-21  6:26                               ` Eli Zaretskii
2021-03-21  7:04                               ` Theodor Thornhill via Emacs development discussions. [this message]
2021-03-21 12:44                                 ` Dmitry Gutov
2021-03-20 22:10                   ` Juri Linkov
2021-03-21 19:47                     ` Dmitry Gutov
2021-03-20 17:31       ` Stefan Kangas
2021-03-20 18:55         ` Dmitry Gutov

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=m1y2ehm1hu.fsf@Frende-MacBook.lan \
    --to=emacs-devel@gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=simenheg@gmail.com \
    --cc=stefan@marxist.se \
    --cc=theo@thornhill.no \
    /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.