From 47b378367169c3de160600e28ab08820a6d4b49f Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 30 Aug 2022 08:25:23 -0400 Subject: Improve default names for per-project REPLs. --- elisp/geiser-repl.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index 469c0f5..26f4168 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -343,7 +343,13 @@ will be set up using `geiser-connect-local' when a REPL is started.") (defun geiser-repl-buffer-name (impl) "Return default name of the REPL buffer for implementation IMPL." - (format "*Geiser %s*" (geiser-repl--repl-name impl))) + (let ((repl-name (geiser-repl--repl-name impl)) + (current-project (funcall geiser-repl-current-project-function))) + (if (and geiser-repl-per-project-p current-project) + (let ((project-name (file-name-nondirectory + (directory-file-name current-project)))) + (format "*Geiser %s: %s*" repl-name project-name)) + (format "*Geiser %s*" repl-name)))) (defun geiser-repl--switch-to-buffer (buffer) (unless (eq buffer (current-buffer)) -- cgit v1.2.3