emacs-devel
[Top][All Lists]
Advanced

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

Re: Subprojects in project.el


From: Dmitry Gutov
Subject: Re: Subprojects in project.el
Date: Sun, 27 Nov 2022 23:43:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 27/11/22 21:25, Juri Linkov wrote:
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.
Or generally a numeric prefix argument could define the depth of the
nested project to use.  Then every level could set own root, e.g.:

   (dir-locals-set-class-variables 'project-root ((nil . (project-root t))))
   (dir-locals-set-directory-class "~/Source/very-big-project" 'project-root)
   (dir-locals-set-directory-class "~/Source/very-big-project/foo" 
'project-root)
   (dir-locals-set-directory-class "~/Source/very-big-project/foo/bar" 
'project-root)

While using e.g. 'C-x p g' in "~/Source/very-big-project/foo/bar"
by default will use the closest root, i.e. the same directory,
but 'M-1 C-x p g' will use the root "~/Source/very-big-project/foo",
and 'M-2 C-x p g' will use the root "~/Source/very-big-project/".

If you like, sure.



reply via email to

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