GNU bug report logs - #47975
28.0.50; Project prefixed buffer name

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Fri, 23 Apr 2021 16:39:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47975 in the body.
You can then email your comments to 47975 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#47975; Package emacs. (Fri, 23 Apr 2021 16:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 23 Apr 2021 16:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Project prefixed buffer name
Date: Fri, 23 Apr 2021 19:32:17 +0300
[Message part 1 (text/plain, inline)]
It seems the commit 08fab316a1 calls for more changes:

[project-prefixed-buffer-name.patch (text/x-diff, inline)]
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 5996a76488..914d7ce9e4 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -918,10 +918,7 @@ project-shell
 if one already exists."
   (interactive)
   (let* ((default-directory (project-root (project-current t)))
-         (default-project-shell-name
-           (concat "*" (file-name-nondirectory
-                        (directory-file-name default-directory))
-                   "-shell*"))
+         (default-project-shell-name (project-prefixed-buffer-name "shell"))
          (shell-buffer (get-buffer default-project-shell-name)))
     (if (and shell-buffer (not current-prefix-arg))
         (pop-to-buffer-same-window shell-buffer)
@@ -937,10 +934,7 @@ project-eshell
   (interactive)
   (defvar eshell-buffer-name)
   (let* ((default-directory (project-root (project-current t)))
-         (eshell-buffer-name
-          (concat "*" (file-name-nondirectory
-                       (directory-file-name default-directory))
-                  "-eshell*"))
+         (eshell-buffer-name (project-prefixed-buffer-name "eshell"))
          (eshell-buffer (get-buffer eshell-buffer-name)))
     (if (and eshell-buffer (not current-prefix-arg))
         (pop-to-buffer-same-window eshell-buffer)
@@ -1004,6 +998,7 @@ project-compilation-buffer-name-function
   "Function to compute the name of a project compilation buffer.
 If non-nil, it overrides `compilation-buffer-name-function' for
 `project-compile'."
+  :version "28.1"
   :group 'project
   :type '(choice (const :tag "Default" nil)
                  (const :tag "Prefixed with root directory name"

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47975; Package emacs. (Fri, 23 Apr 2021 22:59:02 GMT) Full text and rfc822 format available.

Message #8 received at 47975 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>, 47975 <at> debbugs.gnu.org
Subject: Re: bug#47975: 28.0.50; Project prefixed buffer name
Date: Sat, 24 Apr 2021 01:58:51 +0300
Hi Juri,

On 23.04.2021 19:32, Juri Linkov wrote:
> It seems the commit 08fab316a1 calls for more changes:

I stopped short of doing this keeping in mind the possibility for fixing 
and reusing uniquify not too far off in the future.

But please feel free to install, it shouldn't hurt either way.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47975; Package emacs. (Sat, 24 Apr 2021 21:56:01 GMT) Full text and rfc822 format available.

Message #11 received at 47975 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 47975 <at> debbugs.gnu.org
Subject: Re: bug#47975: 28.0.50; Project prefixed buffer name
Date: Sun, 25 Apr 2021 00:54:27 +0300
tags 47975 fixed
close 47975 28.0.50
thanks

>> It seems the commit 08fab316a1 calls for more changes:
>
> I stopped short of doing this keeping in mind the possibility for fixing
> and reusing uniquify not too far off in the future.

Reusing uniquify is welcome, it could eliminate the need of redefining
the built-in commands to be able to generate unique compilation buffer names:

(defun my-project-compile ()
  (interactive)
  ;; Like ‘project-compile’ but generate unique buffer names:
  (let ((default-directory (project-root (project-current t)))
        (compilation-buffer-name-function
         (lambda (mode)
           (generate-new-buffer-name
            (project-prefixed-buffer-name mode)))))
    (compile (compilation-read-command (car compile-history)) nil)))

> But please feel free to install, it shouldn't hurt either way.

Now installed in master.




Added tag(s) fixed. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Sat, 24 Apr 2021 21:56:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.0.50, send any further explanations to 47975 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Sat, 24 Apr 2021 21:56:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 23 May 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 336 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.