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 00:11:29 +0200 Message-ID: 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> 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="27303"; 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: monnier@iro.umontreal.ca, danny@dfreeman.email, eric@ericabrahamsen.net, emacs-devel@gnu.org To: Eli Zaretskii , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 24 23:12:21 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 1oyKSB-0006os-0j for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Nov 2022 23:12:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyKRU-00012o-TZ; Thu, 24 Nov 2022 17:11: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 1oyKRT-00012X-Vj for emacs-devel@gnu.org; Thu, 24 Nov 2022 17:11:36 -0500 Original-Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyKRS-0006VL-6C; Thu, 24 Nov 2022 17:11:35 -0500 Original-Received: by mail-wr1-x431.google.com with SMTP id x5so4288839wrt.7; Thu, 24 Nov 2022 14:11: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=xTOHObliR3NQG0tagk1VAP269vs16GsLbrJ5H2uCzmY=; b=ph0zHYbxQL9grOp2i/oq+CcFFBz1+O3h1obalIj377vXsTws7LCK/qC1CVvNo3z4wB 1vr+HPfpG8ETyB7KIEIlivmpYaos4J4/+llDYJfoyFnfGMCZSDMnTIwpoqzLYvDZxkfL +5D/Qd7dUrWgBX8Udo+V7csxnhk8rcL85Hgyn2uU026343LVejLLReHq1jnrvT5nzwWs BjDomKkZEUqSkBjeD4mDAZwyyCGkkR/fbaENQUJLqwJjuKj/3vH7oNITI5EmLFtfR+No OjkQby/+GUw7J8vpZaOMK77k8o+06idIqBdjSPk+hiNi7WdEN61+zrBK+V4PEPl9e2B/ WRiQ== 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=xTOHObliR3NQG0tagk1VAP269vs16GsLbrJ5H2uCzmY=; b=iFteJ7TNHs30sYTbBTdrw3aX2/y2D+xMTrhU0PEZEDbK33aHmPQGsDEAZVjSC2tAGT Z+tKSXzxHembSzJBkGSIAFRG90ptLoMwYVstkbvIRQea8aOsgIs6ykLayWMYe2TxDT5V OuT2kpL1K0NAJa31XTWn5jta0StFTmlbsEcj6YtTyXmYWfD1c5pgMpJeJ9VnztFVRLkX TXAtm8OvNmH/+UE5ye6089Cr1bCKOInmGyjvh+YEi2D8dbR9lCHKyWDLoh2cfet0K9Iv JDGOAgPZm64Nvp8qewF32qdaRYyHMFIAPfqzZva2nEEUe17hjpQIbrYTjpC0adyDM5xb sGnA== X-Gm-Message-State: ANoB5pnQsmp4yTxsTcwgXlNRGKExMXpE1PX6Rhp0Crh5jS4isrPPJ19V f/Iae51wqh5Ws30JJyA4Zqr/zUU7KeQ= X-Google-Smtp-Source: AA0mqf5K7l8lz8Fv7R4y6LdKowpkoRqIYh/+r479+vbYPDVlQo8Pb+iI96U6/BsrKkLURCC2ZjDFnA== X-Received: by 2002:a5d:4852:0:b0:241:e62c:e405 with SMTP id n18-20020a5d4852000000b00241e62ce405mr8504872wrs.257.1669327891885; Thu, 24 Nov 2022 14:11:31 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id a7-20020a05600c348700b003cf75f56105sm3480492wmq.41.2022.11.24.14.11.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Nov 2022 14:11:31 -0800 (PST) Content-Language: en-US In-Reply-To: <83o7swyipe.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=raaahh@gmail.com; helo=mail-wr1-x431.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.209, 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:300447 Archived-At: On 24/11/22 08:23, Eli Zaretskii wrote: >> From: João Távora >> Date: Wed, 23 Nov 2022 20:33:04 +0000 >> Cc: Stefan Monnier, >> Danny Freeman, >> Eric Abrahamsen, emacs-devel >> >> (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))))) > Is this okay for code outside project.el to know the internal structure of a > project object in general, and in particular cons "by hand" a 'transient' > project object? I thought this was a closely-guarded implementation detail > that even doc strings are not allowed to divulge? Joao's code here is not production-ready, but it wasn't intended as such either, I guess. Any 'sub-projects' function would likely be generic with implementations belonging to a particular backend. And a backend knows how to construct its instances.