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: Fri, 25 Nov 2022 19:24:26 +0200 Message-ID: <45549e6b-942f-ee99-9123-8176545a159e@yandex.ru> References: <87zgcq68zp.fsf@ericabrahamsen.net> <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> <83o7swyipe.fsf@gnu.org> <83sfi7v6dj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35355"; 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: joaotavora@gmail.com, monnier@iro.umontreal.ca, danny@dfreeman.email, eric@ericabrahamsen.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 25 18:25:12 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 1oycRr-0008xi-N6 for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Nov 2022 18:25:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oycRI-0001e8-C2; Fri, 25 Nov 2022 12:24:36 -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 1oycRG-0001dU-T0 for emacs-devel@gnu.org; Fri, 25 Nov 2022 12:24:34 -0500 Original-Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oycRE-0001R7-11; Fri, 25 Nov 2022 12:24:33 -0500 Original-Received: by mail-wr1-x436.google.com with SMTP id bs21so7750647wrb.4; Fri, 25 Nov 2022 09:24:31 -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=9MpdqZjSl7vAlutLn8WsEpLBjRmPPLOnHTSCC5k0w8U=; b=LNvkEq6dP8slvX1ltfHs3LYX2LxhWGfOHxMUuFiuZn3OMDGzIr5QrP9jwpPbYfN8J5 eLWlW/12AXh1kJyKGplBkF84DqSP4Ix7M+NfN/tr9t7jv4aehd7k1cqozI48N8jfVzRN 7rWGQcCn5nt+zf61y+aNXdmuQ2cHvQukTvAWVpKXPuSoIIor/UOc3mid0MZBZ4EbQLtf MLK546XSVRS1mmwrw8bj8Pvmqwo9bCgY8M8bo5evASU2xTIjqgJLfQZgMAxaOMlTRESL YCdc82H8fi/pxL3pyoPFYu/r+CCNvZxrX8/dNOx1jJEfHoN0B66ZuHhpshNwYo0hJtyw 0pEg== 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=9MpdqZjSl7vAlutLn8WsEpLBjRmPPLOnHTSCC5k0w8U=; b=Ws36dBZ7f025EYBu0Li2iopj4v/KgqeFRDB+76Xf1Bp0x2tW7CPlrbNOlxj59Uk4/k XCxdkgT9QlMqFqoDAoQ3xuh7xPq114eFZD1G+TN+KxVhECpg3e/hYDBcyYC3XgmfDrrh ulDUdFUIqOCGDgi8MAT7epfoXN1SYkbjUNO22KOz9UCYK1S2BTrAXJQe3cVNxD7Obf5V vlL20HwVyAJ6sLTE05fx5j+8/Z6zBSj+qe3hsZs1yXPcqY0AG6FmaGpxcZ7XKOPKzIRw fBMzoqvYV5UbkZH/S7IVmLJeGKkxhgwsz/qjZ1NCBhjcpV9AkHWc1ppZaJ5YLcm/P6xR S1mQ== X-Gm-Message-State: ANoB5pktrrivEANMQEVq2c7x+4XS/GxlPe7HNGtM52/Gj8VzhLUrfxgG B6c2GQEeWhmGMM2WMgLYyaU2BFlo/Ok= X-Google-Smtp-Source: AA0mqf68OdzVw0fJhzVW1BL9dzRB4lz3pUeUA5go2umnz51DQ1TSnO5OJNOvY1kh3nfHIhALa23j0A== X-Received: by 2002:a5d:5948:0:b0:241:e929:fc44 with SMTP id e8-20020a5d5948000000b00241e929fc44mr9904213wri.27.1669397069529; Fri, 25 Nov 2022 09:24:29 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id r16-20020a5d6950000000b0022e36c1113fsm4099738wrw.13.2022.11.25.09.24.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Nov 2022 09:24:28 -0800 (PST) Content-Language: en-US In-Reply-To: <83sfi7v6dj.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=raaahh@gmail.com; helo=mail-wr1-x436.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:300503 Archived-At: On 25/11/22 09:30, Eli Zaretskii wrote: > I'm probably missing something: how does a Lisp program construct an > instance of a project with a known backend? For example, if the project is > of the 'transient' kind, how would such a Lisp program go about constructing > an instance without exposing/knowing about the internals of the project > object? I see no generic make-project API that such a Lisp program could > call. What did I miss? The Lisp program that constructs instances of 'transient' is 'project-current'. There could also someday be a new function that we add by its side (e.g. a helper function) which would also do that. And that's okay because they belong to the same package, and thus do not export the "private" knowledge. The program that creates instances of 'vc' type is called 'project-try-vc'. But we could similarly add a generic method belonging to the same unit of code (called 'project-subprojects') which would "belong" to the VC project backend and create a list of instances of its type.