From: Theodor Thornhill <theo@thornhill.no>
To: 41858@debbugs.gnu.org
Subject: bug#41858: Add the patch as a .patch
Date: Sun, 14 Jun 2020 18:51:59 +0000 [thread overview]
Message-ID: <87pna132gl.fsf@thornhill.no> (raw)
In-Reply-To: <87tuzd33i3.fsf@thornhill.no>
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
Hello,
Sorry, seemed to forget the extension to the attached file.
This file should be more accessible.
Hope everything works now.
Theodor Thornhill
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: project-shell.patch --]
[-- Type: text/x-patch; name=project-shell.patch, Size: 1268 bytes --]
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index f3df44fa7b..50e3dc3c8a 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -686,11 +686,21 @@ project-vc-dir
;;;###autoload
(defun project-shell ()
- "Open Shell in the current project."
+ "Open Shell in the current project.
+With \\[universal-argument] prefix, create subsequent shell buffers
+with uniquified names."
(interactive)
- (let ((default-directory (project-root (project-current t))))
- ;; Use ‘create-file-buffer’ to uniquify shell buffer names.
- (shell (create-file-buffer "*shell*"))))
+ (let* ((default-directory (project-root (project-current t)))
+ (default-project-shell-name
+ (concat "*" (file-name-nondirectory
+ (directory-file-name
+ (file-name-directory default-directory)))
+ "-shell*"))
+ (shell-buffer (get-buffer default-project-shell-name)))
+ (if (and shell-buffer (not current-prefix-arg))
+ (switch-to-buffer-other-window shell-buffer)
+ ;; Use ‘create-file-buffer’ to uniquify shell buffer names.
+ (shell (create-file-buffer default-project-shell-name)))))
;;;###autoload
(defun project-eshell ()
next prev parent reply other threads:[~2020-06-14 18:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-14 18:29 bug#41858: 28.0.50; [PATCH]: Make project-shell use universal argument Theodor Thornhill
2020-06-14 18:46 ` Dmitry Gutov
2020-06-14 18:51 ` Theodor Thornhill [this message]
2020-06-14 22:46 ` Juri Linkov
2020-06-15 6:50 ` Theodor Thornhill
2020-06-15 23:01 ` Juri Linkov
2020-06-18 9:57 ` Theodor Thornhill
2020-06-18 13:28 ` Eli Zaretskii
2020-06-18 18:00 ` Theodor Thornhill
2020-06-20 1:03 ` Dmitry Gutov
2020-06-15 13:05 ` Dmitry Gutov
2020-06-15 14:53 ` Theodor Thornhill
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=87pna132gl.fsf@thornhill.no \
--to=theo@thornhill.no \
--cc=41858@debbugs.gnu.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.