From 8cb9aaec0fbb2bcc1640c11e842852b7f3f420e9 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 10 Feb 2026 02:22:24 +0200 Subject: [PATCH] Amend previous to avoid remote call in project--remove-from-project-list * lisp/progmodes/project.el (project--remove-from-project-list): Don't call 'abbreviate-file-name', expect it to be abbreviated already. The file might be on an inaccessible filesystem. (project-current): Call abbreviate-file-name here (bug#80340). --- lisp/progmodes/project.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 80f705f49c6..efd79d0155b 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -275,7 +275,8 @@ of the project instance object." (if pr (project-remember-project pr) (project--remove-from-project-list - directory "Project `%s' not found; removed from list") + (abbreviate-file-name directory) + "Project `%s' not found; removed from list") (setq pr (cons 'transient directory)))) pr)) @@ -2206,7 +2207,7 @@ result in `project-list-file'. Announce the project's removal from the list using REPORT-MESSAGE, which is a format string passed to `message' as its first argument." (project--ensure-read-project-list) - (when-let* ((ent (assoc (abbreviate-file-name project-root) project--list))) + (when-let* ((ent (assoc project-root project--list))) (setq project--list (delq ent project--list)) (message report-message project-root) (project--write-project-list)))