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: Sat, 26 Nov 2022 04:07:57 +0200 Message-ID: References: <87zgcq68zp.fsf@ericabrahamsen.net> <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> <86pmdb34hb.fsf@mail.linkov.net> <87cz9atx3o.fsf@gmail.com> <029529d0-a846-483b-cb13-67fad54e9b13@yandex.ru> <87v8n2sftx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25659"; 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: Juri Linkov , Stefan Monnier , Danny Freeman , Eric Abrahamsen , emacs-devel To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 26 03:08:35 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 1oykcN-0006YI-M3 for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Nov 2022 03:08:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oykbt-00042p-L2; Fri, 25 Nov 2022 21:08:05 -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 1oykbq-00042Q-Si for emacs-devel@gnu.org; Fri, 25 Nov 2022 21:08:02 -0500 Original-Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oykbo-0000ju-LM for emacs-devel@gnu.org; Fri, 25 Nov 2022 21:08:02 -0500 Original-Received: by mail-wm1-x32f.google.com with SMTP id a11-20020a05600c2d4b00b003cf6f5fd9f1so4577595wmg.2 for ; Fri, 25 Nov 2022 18:08:00 -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=rlbJPBJKp+kA4iu1Rffct+SW7pnQyEiKAJnDcoxWS4c=; b=NM4YUgqELn9UMhZu0lOEiJSSQ2oLKPEd1s3uTWdM5ScO7zpvKTTpNkN0s5BmqXxvyp uD661d36fsynZXlXl2i6+IngLgy0dS+xPX/G14cm+JvV+KMYDOMxr2UvInR0V4YzjHgj 9ms8DOPDm2kqu4zJ37VcEG/RHeTFh/tnZFgG4OpzL/OZfKkBJ7O3NdMDKvlGOWpeW/9t FCOc9PdsaVwg8mtGt4TVDpm+qogUzJQ4z2h/8Dq9CJeLJl+8UB5sIso/6v00+w9FD6Pv 4xigIr5pG+JV6R0mbW048FnvAkDp1XgWLCGge12fjWH4NoWEWTDK0vtiUnRMcGxAO3C+ mI1Q== 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=rlbJPBJKp+kA4iu1Rffct+SW7pnQyEiKAJnDcoxWS4c=; b=4EVlf0J1HVvDoE+EG2rLn67iGFFREH7w+Tmvwy91HwnsHdPKfcNTfX8B7KLjeuORbw pjl6BaFH/exmgEZZAKen7mI0bSp/gB942MUi5nATdXEWpoPK+0d1HsXNQeZe0z8CGaP9 Kpq5MIOfeUFZuLxphZKCH/RTln250hO3KCglGKkq2Zzq/Jof2N7BmEMnCW0hbyeGzrmu jjPj2nMIHWzUmc+Hn1bvhqaNcQl8qacI8uecLGxTVyhL2t6BOUCfPsSJlkuCHxuYQD8O qgiQMAbG3UF3l2/MO7LcTANPV+DU7sIY3EASyfTglCZGS3n1Uhx10bOO1u98QmrRqMZv 8UQg== X-Gm-Message-State: ANoB5pmNxmaihu3wQJpTfF6xLtWyJ5fCsm1bV1aGUlvAEVE7U89puCN+ 48cfE7+6SjIbhTjOUWRduT4= X-Google-Smtp-Source: AA0mqf6FUShmJk64ZIIxXZvdxo3/D5+Pxu+oNDRiLfnhc1dFo9P6faKnqTCrCB4lRhpbFmlAg43mEA== X-Received: by 2002:a05:600c:3107:b0:3c6:e1b5:71c2 with SMTP id g7-20020a05600c310700b003c6e1b571c2mr16495566wmo.94.1669428479012; Fri, 25 Nov 2022 18:07:59 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id b10-20020adfde0a000000b0022e57e66824sm5718441wrm.99.2022.11.25.18.07.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Nov 2022 18:07:58 -0800 (PST) Content-Language: en-US In-Reply-To: <87v8n2sftx.fsf@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.243, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:300544 Archived-At: On 26/11/22 02:46, João Távora wrote: > Dmitry Gutov writes: > >> On 26/11/22 01:47, João Távora wrote: >>> You can use dir-locals-set-class-variables to variable like the >>> hypothetical project-subproject-prefixes to the super-project's root. >>> This contains a list of strings or regexps that identify the subprojects >>> inside the superproject. I don't see the problem. Elements in >>> project-find-functions would be aware of this value and proceed >>> accordingly to find the subprojects. >> I don't see the problem in that. >> >> I just fail to see an advantage either, given that the list of >> prefixes would be different between the "super" projects, so the >> suggestion to use a class is perplexing. > The point of dir-locals-set-class-variables is to set directly-locals > "from a distance" when creating an actual .dir-locals.el file isn't > feasible or desired. > > (dir-locals-set-directory-class "~/Source/very-big-project" 'very-big-project) > (dir-locals-set-class-variables 'very-big-project ((nil . (project-find-prefixes "foo" "bar/baz.*")))) > > Even if it's a one-use class, there's nothing wrong with that IMO. And > chances are you have multiple clones or Git worktrees of the same > project, so you may as well make it a two- or three-use class > > (dir-locals-set-directory-class "~/Source/worktree-2" 'very-big-project) > (dir-locals-set-directory-class "~/Source/another-clone" 'very-big-project) > > > Of course if the user is able to AND wants to use .dir-locals.el or > marker files, that is fine, too. I personally like the above scheme. We don't have the -prefixes variable (and Stefan asked for a way to tag a project root, probably even without any VC repository around), but as a replacement for .dir-locals.el -- cool, good recommendation.