emacs-devel
[Top][All Lists]
Advanced

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

Re: Subprojects in project.el (Was: Eglot, project.el, and python virtua


From: Dmitry Gutov
Subject: Re: Subprojects in project.el (Was: Eglot, project.el, and python virtual environments)
Date: Fri, 25 Nov 2022 19:24:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 25/11/22 09:30, Eli Zaretskii wrote:
I'm probably missing something: how does a Lisp program construct an
instance of a project with a known backend?  For example, if the project is
of the 'transient' kind, how would such a Lisp program go about constructing
an instance without exposing/knowing about the internals of the project
object?  I see no generic make-project API that such a Lisp program could
call.  What did I miss?

The Lisp program that constructs instances of 'transient' is 'project-current'. There could also someday be a new function that we add by its side (e.g. a helper function) which would also do that. And that's okay because they belong to the same package, and thus do not export the "private" knowledge.

The program that creates instances of 'vc' type is called 'project-try-vc'. But we could similarly add a generic method belonging to the same unit of code (called 'project-subprojects') which would "belong" to the VC project backend and create a list of instances of its type.



reply via email to

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