emacs-devel
[Top][All Lists]
Advanced

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

Re: project.el semantics


From: Dmitry Gutov
Subject: Re: project.el semantics
Date: Thu, 19 Nov 2015 04:21:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0

On 11/13/2015 12:04 AM, Dmitry Gutov wrote:

Please feel free to submit a patch across these lines (adding
project-metadata). It might be moot now, given that John decided to pull
project.el from Emacs 25.1, but it could at least serve as a point of
comparison for his project API proposal.

Scratch that. John and I had a chat, and it seems project.el has a chance in Emacs 25.1, provided it's changed along the lines we've been discussing here.

I've had some thoughts since.

Some minor things:

- We'll probably want to rename `project-roots' to `project-directories'. Even though they'll be treated like "roots" (traversed recursively) most of the time, a project backend can return different kinds of directories in this list, including certain subdirectories of the project root(s).

For instance, in can include the test roots in there. Or, I don't know, some other kinds of directories that aren't supposed to be traversed recursively.

- If we're only documenting the "categories" key inside project-metadata, why not have a project-directory-categories method instead? We can add the -metadata method, too, now or later.

- What's the category name for the directories that are the project roots in the current interpretation? Internal?

Bigger one:

- If each directory is supposed to be categorized, and the set of categories is flexible, what's going to be the counterpart to `project-library-roots-function'?

Do we call it project-roots-function, and allow it to return a list of uncategorized strings, which each project-directories impl must merge in?

Or do we allow a new variable which would return a buffer-local project (adhering to the same API), which the "real" project would delegate to?

Alternatively, I'm inclined to mix the first option with demoting project-roots-function to project-vc-directories (a mixed list of strings and functions). One fewer wart in the API, and the list would be directory-local, instead of buffer-local.

We can also mix 2 and 3 (project-vc-directories might contain language-specific backends, as well as strings), but that's probably too weird.



reply via email to

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