Subject: bug#41572: 28.0.50; [PATCH] Support plain project marked with file .emacs-project

From: Dmitry Gutov <[email-masked]>
Date: Tue, 5 Oct 2021 18:03:49 +0300

Hi Nikolay,

On 05.10.2021 17:39, Nikolay Kudryavtsev wrote:
> Hello. I have some stake in this issue too.
> 
> The proposed patch is ok, but I think that we can go for a more 
> ambitious solution here that would require just a little more work, but 
> would be a lot more useful.
> 
> Maybe lets have a make-file-backend function, the output of which you 
> can cons onto project-find-functions, so any file defined like this 
> would be just another separate backend.
> 
> This function in turn can be used by major mode developers and users to 
> implement project backends. If we look at the list of projects supported 
> by Projectile 
> <https://docs.projectile.mx/projectile/projects.html#file-markers>, we 
> can see that this one function is enough already to implement most of 
> them. Having such file backends also leaves the question of whether the 
> particular file should have a higher priority than VC to the end user, 
> depending on where he(or some major mode he's using) adds a particular 
> one into the list.

Is this pretty much to be able to choose the backends order?

I'm afraid it's not a good idea: any backend that comes before the VC 
backend can make the user experience worse. Because Git-based (fast) 
file listing is only implemented for the VC backend.

> As for whether there should be some kind of default file marked project, 
> sure, the user can just remove it if he want to.

And you can customize which file names serve as markers.