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).
This commit is contained in:
Dmitry Gutov 2026-02-10 02:22:24 +02:00
parent 9fd2fd5225
commit 8cb9aaec0f

View file

@ -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)))