emacs-devel
[Top][All Lists]
Advanced

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

Re: Subprojects in project.el


From: João Távora
Subject: Re: Subprojects in project.el
Date: Fri, 25 Nov 2022 20:16:07 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

Dmitry Gutov <dgutov@yandex.ru> writes:

>> I am indeed "fussy" about "bug reporting".  But here, Dmitry, I am
>> not
>> reporting a bug.  There's no minimum reproducible recipe, no error
>> to report, no surprising behaviour, etc. to speak of.  We're just
>> discussing Emacs development... in the emacs-devel mailing list.
>
> You are making a new feature request. Or at least were (when you were
> talking about "subprojects" as a new noun for project.el to have, with
> new associated behaviors).

I'm discussing a limitation of project.el regarding subprojects.  If
that is solved with a new feature, a new package, or if it turns out
it's not a limitation at all, I think it's a worthy topic of
emacs-devel.

>> I can't understand what is discourteous about this.
> That would be not following the procedure the maintainer has asked you
> to follow.

If that means silencing me on emacs-devel, then you're out of luck.

> I don't really know what "the user wants". People apparently find this
> discussion too scary or meandering to provide any additional
> input. The several who I asked to comment have walked away
> perplexed. Or perhaps it's just Debbugs.

People seem to be contributin a healthy amount of information here.

> People do seem it natural to express their custom project structures
> via file markers, at least that's what I see in the wild as
> project-find-functions customizations.

Yes.  Very often there are already such markers in place.  Other times
you can add them yourself.  Other time there aren't any and the people
controlling the projects don't want you to add them (maybe because they
don't use Emacs or care about your uses).

But that shouldn't matter.

My understanding of subprojects, or the operations I want to do with
them isn't affected by the method by which they may be configured:
that's a detail that relatively easy to solve.

To be clear, here's my use case again: I have a complex hierarchy of
directories and files which call the super-project.  I sometimes want to
find files, grep for strings and run compile commands there.  project.el
allows this already (albeit with associated find-file slowness if the
project is really large).

Sometimes I will work for some period exclusively in one of the
super-projects's sub hierarchies.  When doing so, I will look for files,
grep strings and run compile commands in that hierarchy which I call the
sub-project.  Doing so cuts down on the noise of other files and grep
matches in other parts of the super-project that I'm not interested in.

Not all files that belong to the super-project necessarily belong to a
sub-project.  Some of them _only_ belong to the super-project.n

Anyway, indeally I want these three main operations (find-file, grep,
compile) to run in the inner sub-project by default.  By typing
something more, like, say, a negative prefix argument, I want to be able
to be given the possibility to operate on the super-project instead.

> The idea of customizing the projects with a list of relative
> subproject directory file names solves those downsides, but comes with
> lack of automation: you have to do it for every relevant project, and
> not forget to update the settings as the project structure
> changes. Which might also be a pain e.g. when switching branches, if
> your dir-locals.el is not checked in.

As Juri mentioned, dir-locals-set-class-variables is the tool you need
in those cases.  There are ample tools to solve this problem.  We should
first focus on the project.el infrastructure that enables the above use
case in the first place.

João



reply via email to

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