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 Date: Mon, 28 Nov 2022 02:41:12 +0200 Message-ID: References: <87zgcq68zp.fsf@ericabrahamsen.net> <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> <878rjytwqa.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="39333"; 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: Eli Zaretskii , monnier@iro.umontreal.ca, danny@dfreeman.email, eric@ericabrahamsen.net, emacs-devel@gnu.org To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 28 01:41:59 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 1ozSDf-000A4r-00 for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Nov 2022 01:41:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozSD6-0002cQ-3A; Sun, 27 Nov 2022 19:41:24 -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 1ozSD3-0002cA-DX for emacs-devel@gnu.org; Sun, 27 Nov 2022 19:41:21 -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 1ozSCz-0005oI-PA; Sun, 27 Nov 2022 19:41:21 -0500 Original-Received: by mail-wr1-x430.google.com with SMTP id w15so1216776wrl.9; Sun, 27 Nov 2022 16:41:16 -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=+YgXHobmVWgyoTz9KyzRu3pX90hD8g9/bwKhLWBhjc0=; b=AYb6EzVq2iVf6bc8Ci6kdwrzOwlvboUdCvC9lX4X4RyfFfso0++13awR3BLQB/Ee/m 2JMBfGtKyexOHH94Rhf0pTpnEe/OpH7R5Ov+GeFpMTid6+JNaOZKl4BTrZSjP52VxvF7 iHY1cE6aofF+Dy2o3fyyd2IvQJ/4Nso5R+a7mt319LwACHkjCqQ7UbOyOGm3eC6/uV+q cpDQGgUPlP1BppVQmz+IHFYVfgjL9yaEX/XrRSPNA9vytrOllJqv2e7sLgUEYTR+AHsj QJY9cVMKUSvQ5SkVCQZZ5JZIkTB7RaSCGH15P1zu1Fm5BysHlolfPAyHtX73g/7sv/Um Fo+A== 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=+YgXHobmVWgyoTz9KyzRu3pX90hD8g9/bwKhLWBhjc0=; b=pFlRg+24zHWoXh1moovJvRf/Jo1zKhoLOk9auQtbsYL1ueIT7f64qV/RtZHzuOgctH xV4ZwOPi8yQEh4TKRwa7tcNpLUgZl+cGGn0L80SBHQV2aXgt+hc5kxjFESlVuI4l5T21 fn3IXGZvqlPkWyLKGqqR9f5cfVZb2jGyP1tqqW24eVod3gdMy/v0ziv1DOzlQ4p8wSCX tL2ydj5ssTZJ16vqToSYmISOM0YOWQszLrB9psRQI8J4mqbjW4F5K69E+aRmjcsTuSA8 3m89E49K/peHjP/2Iasb/W37w+h/yqLIRjumm5xxKguVE6OVOY3lvPeuVoiQgT7L5jB4 353g== X-Gm-Message-State: ANoB5pndQz1adfmUO6QJBgZzPUEDrsAAjFnu1cedKukt+YCx0kg/ypmY tLLFso1IqZFugxj/Lj7bM5U= X-Google-Smtp-Source: AA0mqf5Bl7pcn830f75A38L7p82BPMp6jVtSzItaht1iYFYE5djJUb+3Z3hBbwDAJao86sHnX+dqGQ== X-Received: by 2002:a5d:68c1:0:b0:242:15b5:59ac with SMTP id p1-20020a5d68c1000000b0024215b559acmr1755416wrw.128.1669596074413; Sun, 27 Nov 2022 16:41:14 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q10-20020a05600c46ca00b003c6bd91caa5sm14238604wmo.17.2022.11.27.16.41.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Nov 2022 16:41:13 -0800 (PST) Content-Language: en-US In-Reply-To: <878rjytwqa.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: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.257, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:300653 Archived-At: On 26/11/22 01:55, João Távora wrote: >> In most cases we will say it's not a good idea, but when a practical >> goal is described we will decide to either say "go ahead, it's okay in >> this case", or, hopefully, suggest a different way to reach that goal >> (just like I did with the 'project-parent' definition example). Or >> rethink and throw away the whole design (hopefully not). > > I don't think it has to be so extreme. I don't understand why there > isn't a user-callable construtor for a type of project that is currently > represented by the '(transient . "") implementation detail. > Demanding that the users of looking to add to project-find-functions > additionally define a whole new type and all the operations to go with > it is unreasonable, IMO. I don't think it's "throwing away the whole > design" to provide one such constructor or a means to simplify this. Do you actually want to use 'transient' in more places? I get why it's okay for Eglot: it only needs the root and the primitive buffer listing logic, and not anything else. But instantiating it in a function that returns a value to be used for all (project.el related) purposes would not be wise. > Even better, provide a CLOS class, so that users may subclass it and use > inheritance in the CLOS generics. CLOS classes (or cl-struct) codify the structure, though, forcing us to make it stable. As long as we're talking about the 'transient' type, it will likely remain as-is for all the years to come, because there's little to be gathered from one user prompt aside from the directory (and that's the main place where the 'transient' instances come from). So I'm not sure why you'd want a CLOS hierarchy start from it: there is nothing to inherit. Just create your classes. The very top one will have to have a definition (an obvious one, 2 line long) for 'project-root', and the result will have all the behaviors of 'transient' already.