From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Subprojects in project.el (Was: Eglot, project.el, and python virtual environments) Date: Sat, 26 Nov 2022 09:26:52 +0200 Message-ID: <83v8n2tbur.fsf@gnu.org> 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> <83o7swyipe.fsf@gnu.org> <83sfi7v6dj.fsf@gnu.org> <45549e6b-942f-ee99-9123-8176545a159e@yandex.ru> <83zgceu8ch.fsf@gnu.org> <7c34024e-c2b6-033f-ff37-a0fdfc9f0cdb@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1814"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joaotavora@gmail.com, monnier@iro.umontreal.ca, danny@dfreeman.email, eric@ericabrahamsen.net, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 26 08:27:29 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 1oypaz-0000GX-Gh for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Nov 2022 08:27:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oypa6-0004cp-EI; Sat, 26 Nov 2022 02:26:34 -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 1oypa4-0004cR-PO for emacs-devel@gnu.org; Sat, 26 Nov 2022 02:26:32 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oypa2-0001ST-OH; Sat, 26 Nov 2022 02:26:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=uvmtN02C/9v4cfBDbrSLFkqT+8Cr0UnwjbZ5BXrAIOg=; b=IxuGYDpaSZA/hriEhH7T QqhVBf+if3ixhOSfzJrB4HC/0gVtjD7GKJ9y62IivGwoAKwthN60z39fYgBL79aLF2g8ivqf0PY5R blVJDGtpyJ6IEdnyxmTHsr81vyQ+gVvzGu4tPakkEAqG7pqfrc+5Kf3M3jqFBmcFEycTD4sOrbXtj TLFY1yvY79bh1AWjGhpstMxO4RDm8UcyKvStoPiOLVnajzJt+trMRQP5tIDBy3QxlPBmilr2+R6+e VxUrGh+s/OonuxC2z+EKmyZJhgoSMLwsx9GaZfH2odyCreOA/zUDspJqfPlAvmpc/D9bJfVdBVnD8 Vx+tG0mJWtwEMg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oypa2-0006DG-6r; Sat, 26 Nov 2022 02:26:30 -0500 In-Reply-To: <7c34024e-c2b6-033f-ff37-a0fdfc9f0cdb@yandex.ru> (message from Dmitry Gutov on Fri, 25 Nov 2022 23:57:51 +0200) 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:300551 Archived-At: > Date: Fri, 25 Nov 2022 23:57:51 +0200 > Cc: joaotavora@gmail.com, monnier@iro.umontreal.ca, danny@dfreeman.email, > eric@ericabrahamsen.net, emacs-devel@gnu.org > From: Dmitry Gutov > > >> The Lisp program that constructs instances of 'transient' is > >> 'project-current'. > > > > I meant to ask about building customized project objects, not the standard > > ones that are already created by project-current. This started with a > > function João wrote to that effect, and he wrote it, AFAIU, because the > > standard kinds of project objects didn't satisfy his needs. > [...] > > Again, you are talking about project kinds already supported by project.el > > as its built-ins. I'm asking how to produce a project of a custom type. > > To produce a project of custom type, you decide the data structure for > that type, write implementations for all the required (and perhaps some > optional) generic methods, then create that structure. It seems I need to spell out everything every time I'm writing something because otherwise you interpret it out of context. So here: I'm asking how to produce a customized project whose type is 'transient', but which doesn't go by the rules of the built-in 'transient' project. As for "project of custom type", where "custom" means "not one of the known types", there's still a situation where my project is similar enough to one of the built-in types to make reimplementation of all the APIs overkill. One could want to use some of the APIs without change and customize others. So this, too, is something that project.el should IMO allow without too much fuss. > You asked, however, how to instantiate a project of a type belonging to > "someone else". But didn't explain why. The "why" is "because one needs to". > The reasons not to rely on internal structure, as a reminder: > > - The internal structures are prone to change, and you don't want your > code to break when that happens. > - When implementing some feature that works with projects, you generally > want it to work with all kinds of projects (which was the whole point of > project.el -- to make this approach work). And that would mean talking > to them through common methods, rather that examine the internals of > this or that project type. I'm fine with all that, but it sounds like the above makes it impossible to implement custom project objects, maybe because there's no make-project method that one could use and/or subclass.