bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64088: [PATCH] Make project-root for vc projects return an absolute


From: Dmitry Gutov
Subject: bug#64088: [PATCH] Make project-root for vc projects return an absolute path
Date: Sat, 12 Aug 2023 03:45:26 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 11/07/2023 02:45, Spencer Baugh wrote:
Dmitry Gutov <dmitry@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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]