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 05:01:30 +0200 Message-ID: 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="18333"; 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 04:02:20 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 1oy2VI-0004bR-Jq for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Nov 2022 04:02:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oy2Ub-0000E4-7G; Wed, 23 Nov 2022 22:01:37 -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 1oy2UZ-0000Dd-GB for emacs-devel@gnu.org; Wed, 23 Nov 2022 22:01:35 -0500 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oy2UX-0005wC-Jr for emacs-devel@gnu.org; Wed, 23 Nov 2022 22:01:35 -0500 Original-Received: by mail-wr1-x430.google.com with SMTP id s5so588034wru.1 for ; Wed, 23 Nov 2022 19:01:33 -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=RkNxVrPKN3PMFrFGb3NGl6lqd9sQqlHdXPVGtZwD7VI=; b=bVUL8YGEajul6UV391UIMSyMNb4W0TQzQE0jZFE8Y0xcmyor9oUkN02F2u5IwY6E/v hLgifwmBrcqH0qOXX4/2ZEVIm1giFwpg7ixcCJesi3jm47iv4K5KDHMLSCYSYSPiFNnE +Srx0Ngk6PwlxVAVAeUd80JnsyASzAaQzJKARIueR2HQb/NhN7Jruo2odNGeiJeD4BFx qJ1eft1Oild4ZcwfqOh4n9kaZ8PTpeRvYCn/748fQdkMP1rKO2dbu9f+Nkm8kWZz24W/ T7yaLYjgaOVpfgfgpDIdU3mhz4ttSVlYexVT30V31tO1QQ/m487UrTGZT2+8+EOuDORM vSQQ== 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=RkNxVrPKN3PMFrFGb3NGl6lqd9sQqlHdXPVGtZwD7VI=; b=he0VDr6pG8GHJURRHrYDmmv148cmd5XXotI295L6Psbn8Ej2mSoWFQ1u3gKCZUIaQE yCDj7GXvGmguOPJpS6VUUmybgrPgp4gIyl5d7UHa9hYsPxwHbMPzWnXOMv2RXno5ZsyY pc/mhGdLl8CPJQn7nizyYMdL3F+jS2s/Kou/dp45fk5BPXN5peYiYVnHCe3KlRwA91QK oYH6l+vLLYccMYjyhrzFGULvZuyO5sHRwiK5HdRvPcn+WiBfR9SFLlOh4P8xD1xi1yIh HfkUGYrhfIuY00Rj5TzDjnWyiK4tZpwPzy/bAAj2/5QIwgNT7ljYh0wSr99rA8utw8N6 Sq8A== X-Gm-Message-State: ANoB5pkv2m9aoqGQjvh5tBDc3bXh0MUvNSnrGCrHdWZSy2sF/OATYXug pX95y1R8hgCXgXK1qvzwKuk= X-Google-Smtp-Source: AA0mqf48d/Qye1BfGf0YyDzCS2YD/q8EMmU0wZ4GacM8anRG27dEmN9+fqmHN35hOdZ5JXsIx+zmug== X-Received: by 2002:a5d:4c4b:0:b0:236:84b5:c0d8 with SMTP id n11-20020a5d4c4b000000b0023684b5c0d8mr19339160wrt.342.1669258891953; Wed, 23 Nov 2022 19:01:31 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id i4-20020a5d55c4000000b0023647841c5bsm33346wrw.60.2022.11.23.19.01.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Nov 2022 19:01:31 -0800 (PST) Content-Language: en-US In-Reply-To: <871qptai4d.fsf_-_@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=raaahh@gmail.com; helo=mail-wr1-x430.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:300415 Archived-At: On 23/11/22 15:57, João Távora wrote: >> It would be much more helpful in a dedicated bug report where we could >> discuss the details, collect the votes and see what kind of design >> will ultimately satisfy the requirements. Instead of drowning it all >> in this thread, which is only moderately related. > I think we're doing fine here but I've changed the subject line to > "unbury" it from the thread. You're fussy about proper bug reporting in your projects, but somehow do not extend that courtesy to others. >> And even if we do, we might not need the additional notion of >> sub-projects. E.g. 'search in the parent project (if any)' might work >> as "take the root, go up a directory, search for a project there; if >> it exists, use it". Though Stephen L. might want a generic for that, >> since his projects do not correlate with directory tree. > And in my case, sub-projects don't necessarily exist exactly one-level > down super-project's root. Sometimes they do, but now always. I don't think that's important whether it's one-level down exactly: (defun project-parent (project) (project-current nil (file-name-as-directory (file-name-directory (directory-file-name (project-root project)))))) >> If we wanted to define projects and subprojects through the same hook, >> the step "get all subprojects of the current project" might not be >> feasible to implement. Because of performance-related considerations. > Those remain to be seen, I can't guess what things you're imagining. I'm imagining that traversing a directory tree with an arbitrary predicate is going to be slow. If the predicate is limited somehow (e.g. to a list of "markers" as base file name, or at least wildcards), 'git ls-files' can probably handle this, with certain but bounded cost. I wrote about this in another email here yesterday.