[Top][All Lists]

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

Re: Eglot, project.el, and python virtual environments

From: Dmitry Gutov
Subject: Re: Eglot, project.el, and python virtual environments
Date: Wed, 23 Nov 2022 02:03:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 23/11/22 01:23, João Távora wrote:
Dmitry Gutov <dgutov@yandex.ru> writes:

On 22/11/22 23:34, João Távora wrote:
Given a tree a tree structure such as a file system that can have
very many nodes, not having any means to take advantage of that structure
tree-ness (as project.el clearly doesn't: see the protocol of
project-files and
the lack of sub-projects) is going to be a hard limitation.  Monorepos
are really popular in many businesses and many of these are large and/or
getting larger.

Like I said: if you want sub-projects, go and write a proper feature
request, with expected behavior, which commands are affected, which
are not.

I've just described in the other thread that I would like to have
finding references and finding files to be able to operate on either
sub-projects or super-projects on demand.  This is the problem I'm
facing, and it's not new.  For example, there is only: find file in the
very large project, and find file in the current directory.  There is no
"find file in this section of the repo, which is a sub-project in

It would be much more helpful in a dedicated bug report where we could discuss the details, collect the votes and see what kind of design will ultimately satisfy the requirements. Instead of drowning it all in this thread, which is only moderately related.

IMO, it's not "improper" to describe problems and use cases: in fact I
prefer that people describe over jumping to vapourware solutions.  But
if you're really looking for a suggestion as to _how_ to design it, I
suppose my problem would be well dealt with a negative prefix on C-x p g
and C-x p f giving me a choice of which project to operate on.  But that
is only one possibility: new commands are also acceptable.

Note that you can more-or-less do this now: press 'C-x p p', select the parent project from the list, then choose 'f' or 'g' to run the command there. So to justify the added complexity one should say that they do want to use this feature frequently enough to justify the added complexity (which will reduce the number of keystrokes).

And even if we do, we might not need the additional notion of sub-projects. E.g. 'search in the parent project (if any)' might work as "take the root, go up a directory, search for a project there; if it exists, use it". Though Stephen L. might want a generic for that, since his projects do not correlate with directory tree.

OTOH, if one of the operations will require a step "get all subprojects of the current project", then a separate notion might be required, with a separate hook.

As to how one defines sub-projects, I think having
project-find-functions be used to compose a list of projects (as opposed
to to stopping after finding one) would be a nice way.  It would be nice
if the elements of project-find-functions could be informed of the
projects found so far.  But keeping the "stop after first" behaviour and
having members return a more complex object is maybe also good.  I
really don't care much what you eventually choose, as long as I can
solve my problem.

If we wanted to define projects and subprojects through the same hook, the step "get all subprojects of the current project" might not be feasible to implement. Because of performance-related considerations.

reply via email to

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