]> git.eshelyaron.com Git - emacs.git/commit
Expand project file names before storing them
authorSpencer Baugh <sbaugh@catern.com>
Sat, 19 Aug 2023 12:24:45 +0000 (08:24 -0400)
committerDmitry Gutov <dmitry@gutov.dev>
Wed, 23 Aug 2023 00:07:09 +0000 (03:07 +0300)
commit255b7e1a046cbf9a745d58080d74983bfe205859
tree7129ebd36739d98dad7ec762d53045d4115042f9
parent9507c88f98cdb27425e8a08598acf45e79ccd729
Expand project file names before storing them

Before, whatever project-root returned, we stored as the root
directory of the project in project-list and project-list-file.  This
could lead to duplicate entries or bad behavior if projects were
accessed by different file names, e.g. both /home/user/src/emacs and
~/src/emacs.

Now project-list-file contains only expanded paths and project--list
contains only abbreviated paths.  We abbreviate filenames before
setting project--list, and expand filenames before writing to
project-list-file.  We only do this for local files, though, to avoid
making remote connections; the situation will still be bad for remote
projects, but at least this is an improvement.

* lisp/progmodes/project.el (project--write-project-list): Call
expand-file-name.
(project--read-project-list, project-remember-project)
(project--remove-from-project-list): Call abbreviate-file-name.
lisp/progmodes/project.el