From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Subprojects in project.el Date: Fri, 25 Nov 2022 23:47:55 +0000 Message-ID: <87cz9atx3o.fsf@gmail.com> References: <87zgcq68zp.fsf@ericabrahamsen.net> <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> <86pmdb34hb.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13835"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Juri Linkov , Stefan Monnier , Danny Freeman , Eric Abrahamsen , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 26 00:47:27 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 1oyiPm-0003SA-HY for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Nov 2022 00:47:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyiP8-0001lk-50; Fri, 25 Nov 2022 18:46:46 -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 1oyiP6-0001lV-Bm for emacs-devel@gnu.org; Fri, 25 Nov 2022 18:46:44 -0500 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyiP4-0005K9-5S for emacs-devel@gnu.org; Fri, 25 Nov 2022 18:46:43 -0500 Original-Received: by mail-wr1-x432.google.com with SMTP id d1so8772681wrs.12 for ; Fri, 25 Nov 2022 15:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6oUTNnMPQpPEQU14vRUAtZzKkCTjIBYQUVz/NAGNXvI=; b=Fz/dUbobweSZ58yokKJdrBDi6I3erQcFrUK+ealfCI8jmo5M20ZawaSfqd/DZu4DdF 4pzw8jtnIdIZ4p1ozf/psv/PhUt5SldZ4c0G2Btt0+ZmG5T9mClL+9sd44x7GSDpvm1M fkMvnH7u0P3chaG2U3KH7DFmbSmwEqeSP5NxXIDaejYo8xzIPtQFD87FAjdKCEdQygDa te+jFPlpCel2ua5PRrEru/jZY2+lEoJhsNy/JGnHDrmbgfH6aMMs4dkekGV4OnDpgX4Q 7vS51ewbMx5oTJuUm8t3b2wpvAj7coyaUD8hc2f+czrdsRSMP3VIxR2aFCpgSe1rZjeh 0r1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6oUTNnMPQpPEQU14vRUAtZzKkCTjIBYQUVz/NAGNXvI=; b=NUzMJF6iAVgofwFqnhPdk+9l5K5HDEyJfi4basp6EMcoPDsVd8b4o7PZrduhEC90M/ TZBUGNoHnfs3yKOULKFqp5q0HrDLdy/ArXD4W75F9ppBQAhvFnum9qj3XefLsTd3hHLc Q0XPRmi5kzL2Hgj6R5Lrz9Yabq/j3YH09/+lLtmY7LusKUdZ0LBe+LONj0cJgPXon9nB o7ih4eXRnYcBBMHzCX2x+8pzqkkJoXr/sOys6dYIZZNzuT6exnrFh+3msYZFIwQ69Ww3 GcDr1EOFHPMIuKDBldP5tf4BsyNY6tHGwl1WnJQ7A1RFTLk2vf8s2VVAfSRsveaK0U54 Zslg== X-Gm-Message-State: ANoB5pmoG2tYzCrVOqreKpritaaEE9J6CcBWJtSe434HW+yb/rHn+ZcV yhuMXyKX7PNfv/phpwDHNJ2gDk6H9Vg= X-Google-Smtp-Source: AA0mqf5iU/2Ls1NejDGc4xf6pKgE5i6NZS7aXD1r9cpB//c9Q6rnZ+CZnkwzqwp3M8T4IGdLR4pcHQ== X-Received: by 2002:adf:ebc5:0:b0:241:6c90:79e9 with SMTP id v5-20020adfebc5000000b002416c9079e9mr9449021wrn.642.1669420000322; Fri, 25 Nov 2022 15:46:40 -0800 (PST) Original-Received: from krug (87-196-72-177.net.novis.pt. [87.196.72.177]) by smtp.gmail.com with ESMTPSA id j13-20020adfff8d000000b00241bd177f89sm4718263wrr.14.2022.11.25.15.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 15:46:39 -0800 (PST) In-Reply-To: (Dmitry Gutov's message of "Fri, 25 Nov 2022 22:27:51 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, 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:300531 Archived-At: Dmitry Gutov writes: > On 25/11/22 09:42, Juri Linkov wrote: >>> 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 forge= t 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 check= ed >>> in. >> There is no need to change dir-locals.el. The project root can be >> defined using 'dir-locals-set-class-variables'. Then it can be >> assigned to any directory using 'dir-locals-set-directory-class'. > > How would we fetch the exact root at runtime, if the value is applied > to the whole directory subtree? 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. Jo=C3=A3o