From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Subprojects in project.el Date: Sun, 27 Nov 2022 23:43:31 +0200 Message-ID: <472acf05-58ca-a4e2-a49f-0089833d8013@yandex.ru> 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> <86cz98ck3n.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15923"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: Stefan Monnier , Danny Freeman , Eric Abrahamsen , emacs-devel To: Juri Linkov , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 27 22:44:16 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 1ozPRe-0003tm-4c for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Nov 2022 22:44:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozPR4-0004um-E3; Sun, 27 Nov 2022 16:43:38 -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 1ozPR2-0004rJ-Tf for emacs-devel@gnu.org; Sun, 27 Nov 2022 16:43:36 -0500 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozPR1-0004sM-AO for emacs-devel@gnu.org; Sun, 27 Nov 2022 16:43:36 -0500 Original-Received: by mail-wm1-x32c.google.com with SMTP id t25-20020a1c7719000000b003cfa34ea516so8563868wmi.1 for ; Sun, 27 Nov 2022 13:43:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=GATY94t9mySnCfvddPY21tD6I0D2plKkHcDlqnsEakY=; b=VKnF9vl7Hi3LK8vKCFJkQ/xuQnms1U0AhFwlzbyaYDMUSRlYQGE1LyGOjnqBejufZI bLXTb0WlkP42l42iPQQolxcqz9fd/B6/2LOO7kgVjnwCQdo4mU5P2Hzey+pnYNztVQrW jJnfAZut2B/aKMCrcgKe1Fn8PbmLWlIPncX9nOHx3kKQNE9flRkrOzPP53W0qNLhhqSa TVT11nsW0mc0mKBmjXX0zZC4Cv0+rethPiNwr38YQM5roWhai7TkiPPc1Q+33M71MRNO UjKeFkTyDlAyHbKMqjq4K4/0VhrN5RwJFY4JZw3mC7XzoNo9cG32OydRf1WwhhSllPRO rzWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GATY94t9mySnCfvddPY21tD6I0D2plKkHcDlqnsEakY=; b=S9SJ6cI4xZcik1+0lKP6Tf3UyA4lbFAWzabWXxeXA5DiYEWnEeM+faNq9KxjUW+gNr eoBfMyLcf5fVdxE4VWr2WGOavKeDMXzp2/7LgQXSBYhWqBhLBBpY0uVBOyzEM7gurd4Y mwTB7n9I1BFrVr2ExOahklO8yyKpx1wIRVIfy2swvlslI8wQCPsDCVWwc/raqLar9pLk wtpE9Uzh8PG4P+vRcMOhizr71BS20zCxSWx4u/ONE+hqa+wcQ8PFYm/FoIpDkOSxmTOw DFrxIhqKfm7Awcpc3yCnZ8uRv2CQ0anecvP1QuJkG8r9q/24IR3MEh0H/HLeqxUFem1H Djkw== X-Gm-Message-State: ANoB5pnpXLL7YxfdIqxUVJX7s/efJ1MKOm8OmP3Aqs2HhJSe463Ar4tP EfpA03TSn4c4u9zSDjxDTjs= X-Google-Smtp-Source: AA0mqf7rw4+b7xB/EVKafJ+ZYY2uHkQ+3CDHtToF5ThaCN5wU+pxzaJRd7fOk1NmWxbrnWmTS2c+Gg== X-Received: by 2002:a05:600c:4fc4:b0:3c6:c109:2d9 with SMTP id o4-20020a05600c4fc400b003c6c10902d9mr25850436wmq.149.1669585413244; Sun, 27 Nov 2022 13:43:33 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id x8-20020adff0c8000000b00241f632c90fsm10234872wro.117.2022.11.27.13.43.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Nov 2022 13:43:32 -0800 (PST) Content-Language: en-US In-Reply-To: <86cz98ck3n.fsf@mail.linkov.net> Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.257, RCVD_IN_DNSWL_NONE=-0.0001, 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:300651 Archived-At: 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.