GNU bug report logs - #64088
[PATCH] Make project-root for vc projects return an absolute path

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Thu, 15 Jun 2023 20:49:02 UTC

Severity: normal

Tags: patch

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 64088 <at> debbugs.gnu.org
Subject: bug#64088: [PATCH] Make project-root for vc projects return an absolute path
Date: Sat, 12 Aug 2023 03:45:26 +0300
On 11/07/2023 02:45, Spencer Baugh wrote:
> Dmitry Gutov <dmitry <at> gutov.dev> writes:
>> On 27/06/2023 23:01, Spencer Baugh wrote:
>>> OK, how about this?
>>
>> Maybe we should go in the other direction? And call
>> abbreviate-file-name on them?
>>
>> Because otherwise in project-prompt-project-dir we'll always show the
>> expanded directory names, taking up extra space and usually repeating
>> the full name of the user's home directory for no good reason.
> 
> That seems reasonable if we let-bind directory-abbrev-alist to nil
> around it; otherwise we'll be dependent on the user's configuration and
> we might add a directory in one way, and then they add a new value to
> directory-abbrev-alist and we add it again a second way.

That's also fair.

> Although maybe that's fine?  And probably users of
> directory-abbrev-alist would like to have those abbreviations show up in
> project-prompt-project-dir.

They probably would. But indeed if the list was saved with one 
configuration, and read with another, it could lead to a mistake.

> Also we could always call abbreviate-file-name at
> project-prompt-project-dir time.

Meaning it will be called N times (for the number of projects) every 
time the list is displayed, instead of just once, when the project is 
saved/visited. But maybe it's fine too? How slow could that be?

It's probably not too significant problem either way, no matter which 
direction we choose. And we could revert later.

What do you think? Feel free to submit a new patch (note that the one 
you submitted previously would need the abbreviate-file-name calls added 
to it, before the list is displayed).




This bug report was last modified 1 year and 331 days ago.

Previous Next


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