From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Subprojects in project.el Date: Sun, 27 Nov 2022 21:25:16 +0200 Organization: LINKOV.NET Message-ID: <86cz98ck3n.fsf@mail.linkov.net> References: <87zgcq68zp.fsf@ericabrahamsen.net> <84781346-5b88-2be5-38bb-02696fcf1364@yandex.ru> <87o7t2vj19.fsf@dfreeman.email> <877czqtyfy.fsf@dfreeman.email> <87zgcml7g7.fsf@gmail.com> <2ba04533-097a-a1da-ff3f-2c9506fd488e@yandex.ru> <875yf9bbzb.fsf@gmail.com> <87wn7oa0aw.fsf@gmail.com> <7a5b76fd-fb15-8c1e-ea29-bf11f7e0d2ae@yandex.ru> <87bkoya815.fsf@gmail.com> <0024a67d-b8e5-b35c-1b22-82541a170eb3@yandex.ru> <871qptai4d.fsf_-_@gmail.com> <33292672-2a59-ba63-05ab-a7995118a822@yandex.ru> <87pmdau6wo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19692"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Dmitry Gutov , Stefan Monnier , Danny Freeman , Eric Abrahamsen , emacs-devel To: =?iso-8859-1?Q?Jo=E3o_T=E1vora?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 27 20:33:08 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozNOm-0004zK-S3 for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Nov 2022 20:33:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozNO6-0002HZ-Ax; Sun, 27 Nov 2022 14:32:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozNO3-0002HH-Vm for emacs-devel@gnu.org; Sun, 27 Nov 2022 14:32:24 -0500 Original-Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozNO1-0002as-BR for emacs-devel@gnu.org; Sun, 27 Nov 2022 14:32:22 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id A480BFF804; Sun, 27 Nov 2022 19:32:12 +0000 (UTC) In-Reply-To: <87pmdau6wo.fsf@gmail.com> (=?iso-8859-1?Q?=22Jo=E3o_T=E1vora?= =?iso-8859-1?Q?=22's?= message of "Fri, 25 Nov 2022 20:16:07 +0000") Received-SPF: pass client-ip=2001:4b98:dc4:8::229; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300642 Archived-At: > 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/".