GNU bug report logs - #72611
[Patch] Store canonical paths to project roots

Previous Next

Package: emacs;

Reported by: Brad Howes <bradhowes <at> mac.com>

Date: Wed, 14 Aug 2024 02:21:02 UTC

Severity: normal

Tags: patch

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 72611 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Brad Howes <bradhowes <at> mac.com>, 72611 <at> debbugs.gnu.org
Subject: Re: bug#72611: [Patch] Store canonical paths to project roots
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.




This bug report was last modified 191 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.