Subject: bug#59756: closed (Re: bug#59756: [PATCH] Use file-name-nondirectory to determine project-name)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 02 Dec 2022 15:25:02 +0000

Your bug report

#59756: [PATCH] Use file-name-nondirectory to determine project-name

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
59756: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59756
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#59756: [PATCH] Use file-name-nondirectory to determine project-name
From: Dmitry Gutov <[email-masked]>
To: Randy Taylor <[email-masked]>, [email-masked]
Date: Fri, 2 Dec 2022 17:24:11 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On 02/12/2022 05:34, Randy Taylor wrote:
> X-Debbugs-CC: [email-masked] <mailto:[email-masked]>
> 
> If a project is named something like ".emacs.d", file-name-base will 
> return ".emacs" instead of ".emacs.d" as expected (or at least as I 
> expect it).
> 
> Therefore, we use file-name-nondirectory instead.

Applied, thanks!

Subject: [PATCH] Use file-name-nondirectory to determine project-name
From: Randy Taylor <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Fri, 02 Dec 2022 03:34:30 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

X-Debbugs-CC: [email-masked]

If a project is named something like ".emacs.d", file-name-base will return ".emacs" instead of ".emacs.d" as expected (or at least as I expect it).

Therefore, we use file-name-nondirectory instead.

From 046b1726e17e07d4800e2d3458c60942a579b67e Mon Sep 17 00:00:00 2001
From: Randy Taylor <[email-masked]>
Date: Thu, 1 Dec 2022 22:12:07 -0500
Subject: [PATCH] Use file-name-nondirectory to determine project-name

* lisp/progmodes/project.el (project-name): Use file-name-nondirectory
instead of file-name-base.
---
 lisp/progmodes/project.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 3f4a5fb04bc..4eed599d86c 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -278,7 +278,7 @@ project-external-roots
 (cl-defgeneric project-name (project)
   "A human-readable name for the project.
 Nominally unique, but not enforced."
-  (file-name-base (directory-file-name (project-root project))))
+  (file-name-nondirectory (directory-file-name (project-root project))))
 
 (cl-defgeneric project-ignores (_project _dir)
   "Return the list of glob patterns to ignore inside DIR.
-- 
2.38.1