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 (Was: Eglot, project.el, and python virtual environments) Date: Thu, 24 Nov 2022 04:51:22 +0200 Message-ID: <3f880812-a89b-3afe-7802-68222eb8644d@yandex.ru> References: <87zgcq68zp.fsf@ericabrahamsen.net> <878rkale3l.fsf@dfreeman.email> <4c5f4b07-3df6-d700-83f8-9a9d1b684afc@yandex.ru> <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> 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="11134"; 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: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 24 03:51:40 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 1oy2Ky-0002kr-9F for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Nov 2022 03:51:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oy2Kn-0006aT-MG; Wed, 23 Nov 2022 21:51:29 -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 1oy2Kl-0006aK-NV for emacs-devel@gnu.org; Wed, 23 Nov 2022 21:51:27 -0500 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oy2Kk-00047B-6y for emacs-devel@gnu.org; Wed, 23 Nov 2022 21:51:27 -0500 Original-Received: by mail-wr1-x42f.google.com with SMTP id d1so508412wrs.12 for ; Wed, 23 Nov 2022 18:51:25 -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=Id8Hq2HAaqAdgJ97hnI3VAUq/eLZsczJri+L5vdGaVg=; b=hqn5CdQedLTWAco//1V1HTJO8pjDmZYDxXvE6okogpoE+wrd5FF7UPxaa5WaMS/Kh/ 2f2cMZROIWWQzw7zj2ASgSrOezLgXIz0+wDX6K29MmppdezdLpTtedwt5TBIQYeHXyly 6sprv+462WlyR0p972oc8DlQvJJjc9DuEt8tNWc2lj6Jg0Yv7LUlkxN00xu7WLqPh4oG XQj9U7ofKw7aBYLozuUS51u7b3Z3EQTvYmdGcUphP6o6VromlXVRwiyIeSvbtwCoO3Na uY8WGsQUzmBrKXMW8p5HOFnwREI9J8f+xRayodRrLFnpBByt/9Y7hCeYFy5GJFkyU5WE rkOw== 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=Id8Hq2HAaqAdgJ97hnI3VAUq/eLZsczJri+L5vdGaVg=; b=oo70CtrfUy/srcBF8wTTDI5FDqcOoF5K8QZTQ275Cqt7qo4b/5T/q8UE6yQuS1eOm4 zzaVQWGHOMxuNLxMAv/UKva8UtHzvPNQOAdrm8V3Zi8r2t4KyKxgdgME16KwwdPk1qEw 8NsM9dbed0v8Xp2MLBjLRWco4pVPmSyf4JIwtytNtlhRSBcAtjL+uDI97+UZZOXpdJDc Zi9iZ59Z29ByktgelCKx1ZAEEyfM8/pJEkHLXIKGBUZBdWaxeWq/yugOGiucN+HrqXpd rbiQYLaeSMz1YfuqccX4fjy7jY6Y/70yBMJbrrRnup49jDCKB6kKPWhAjhbnDofDZmPx lEpg== X-Gm-Message-State: ANoB5pkWq55kh3CB2pH9IoyOv9zGWjYmxYchdyrQog47U8SgCN0bsu59 yg9s7Jg3+z/mMOVMkb+Iu90= X-Google-Smtp-Source: AA0mqf4g3Y4jvuv8GJX0dQZ3/TthMMPs9Q8vioOL/euaIU4v7aiKncw5F7p5O7tTXcUu0e5A+XZIKw== X-Received: by 2002:a5d:6dd1:0:b0:236:75a8:58d with SMTP id d17-20020a5d6dd1000000b0023675a8058dmr19232736wrz.295.1669258284745; Wed, 23 Nov 2022 18:51:24 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l11-20020a1c790b000000b003b4a699ce8esm3975760wme.6.2022.11.23.18.51.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Nov 2022 18:51:24 -0800 (PST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.173, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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:300414 Archived-At: On 23/11/22 22:33, João Távora wrote: >   (defun joaot/sub-projects (dir) >     (let* ((super (project-current)) >            (super-root (project-root super)) >            (relative (file-relative-name dir super-root)) >            (d (car (split-string relative "/")))) >       (when (member d '("lisp" "src")) >         (cons 'transient (expand-file-name (concat d "/") super-root))))) > >   (add-hook 'project-find-functions >             'joaot/sub-projects >             t nil) > > This will define two subprojects inside Emacs's tree.  The "lisp" and > "src" projects.  It's not particularly useful for Emacs, but I hope it > illustrates what I want to do. So you're fine with having to specify the list of subprojects for every project manually? Via a hoook or generic override. As opposed to having a globally configured list of (sub)project markers which would do a good job 90% of the time.