Subject: bug#72611: [Patch] Store canonical paths to project roots

From: Dmitry Gutov <[email-masked]>
Date: Mon, 26 Aug 2024 04:20:37 +0300

Hi!

On 13/08/2024 22:56, Brad Howes via Bug reports for GNU Emacs, the Swiss 
army knife of text editors wrote:
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index 3d0f742c51d..af6cf4640d1 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -266,7 +266,7 @@ project-root
>   (cl-defmethod project-root (project
>                               &context (project--within-roots-fallback
>                                         (eql nil)))
> -  (car (project-roots project)))
> +  (expand-file-name (car (project-roots project))))

This is the default implementation of 'project-root' which is currently 
only used as a fallback when a backend implements the outdated 
convention (method 'project-roots').

So it might have effect in your case (which backend are you using? I'd 
like to ask), but not in the general one.

Speaking of "saved project paths file", if your goal is to have expanded 
file names written to ~/.emacs.d/projects, then we have code in 
project--remember-dir that explicitly abbreviates, since August 2023. 
That's commit 255b7e1a046c.

Perhaps if your Emacs and project.el are older, you don't see it yet.