From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Eglot, project.el, and python virtual environments Date: Sun, 20 Nov 2022 20:35:36 +0000 Message-ID: <875yf9bbzb.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23960"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Danny Freeman , Eric Abrahamsen , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 20 21:35:05 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 1owr1t-00061d-05 for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Nov 2022 21:35:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owr1I-0001td-0K; Sun, 20 Nov 2022 15:34:28 -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 1owr1F-0001sA-8L for emacs-devel@gnu.org; Sun, 20 Nov 2022 15:34:25 -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 1owr1D-0000R7-FM for emacs-devel@gnu.org; Sun, 20 Nov 2022 15:34:24 -0500 Original-Received: by mail-wr1-x430.google.com with SMTP id n3so584521wrp.5 for ; Sun, 20 Nov 2022 12:34:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QAZjsBDXGuObg3hpxPl+/UvBRp/OqFyMRXhwxCG4Ypo=; b=A16B8k/i3taSmZG0+Nvm9bJbuCoioU0IydFe21yksSfzKkeinwIjTrdYwUFzhyiwgU hJqlEDLoEfpBAcBZTTEXPUgbeRijz66J25d3y7aqa+wsmbrmNgfzuqG9XMslu9I007wv fPQPVmsVWQ/RZTjIAC9k9UHf4MJ5LxFvg9L1Xq4laJa5S+G8hc9SSr40xocJFg7OcxYn QlmNWz2z9g9bPjr6Vjy0m3F5bmWalb+qKyoeQy13lEQdj6KDbkrs7RqbyuLWzsnOEWXu itqZzWT6uTyB6hP3DPgMcTWu6lspOMb1UWpri3KaDYBxXdQGZlfEvb7Xw6pjwubvKf8+ ZU8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QAZjsBDXGuObg3hpxPl+/UvBRp/OqFyMRXhwxCG4Ypo=; b=uv5a2pElp8p1lGeFjCceX42qUkcHwCRAs1NqvE0Fr1jT7N3c+AqWE7vH06FnvJpdKC VbUgketNUMY94rO1OhgyXlBgAVxZ5kGTBA9NiQSiORXvvkxDdXZq2/xLoxe6bBeiOn4K BC9jJZTJlk1gYF9DXpb+p1gg0ThQ9ilOtLc9Ko5OsYk/IYnUTdDbG58TqizIP9XpyhEJ r9hyFwTAELdlKcE60o3RE4UkLRXrLMRO/80dOeTrfZfipwL0eaz3xqfDLD+p8dK2hkCM 8LyxzO5m/CUzdxROX3xNUfGXDQ6kAi97tcGDs0x2KTZfPrtJSzU9KW5P1xl8Xy+KmQIP SmTQ== X-Gm-Message-State: ANoB5pm8xW+01PgTYozYOAxMQQBLYpFfZA0gpKdwf8+m2UJF6/inpPP+ tslzYXy00/AwhCY1ITFTSSQNbOCyjIo= X-Google-Smtp-Source: AA0mqf7PUDNx4Sd748CfhE8BOShgy28wMJAqFsKjPnsYE+zq9M+LoxyPJI6VkZQteyJbIItBGohnfg== X-Received: by 2002:adf:e3c3:0:b0:241:ccd8:f0f7 with SMTP id k3-20020adfe3c3000000b00241ccd8f0f7mr3489358wrm.393.1668976461451; Sun, 20 Nov 2022 12:34:21 -0800 (PST) Original-Received: from krug ([87.196.81.26]) by smtp.gmail.com with ESMTPSA id bg28-20020a05600c3c9c00b003cfaae07f68sm17724756wmb.17.2022.11.20.12.34.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Nov 2022 12:34:21 -0800 (PST) In-Reply-To: <2ba04533-097a-a1da-ff3f-2c9506fd488e@yandex.ru> (Dmitry Gutov's message of "Sun, 20 Nov 2022 17:36:00 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, 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:300270 Archived-At: Dmitry Gutov writes: > On 20.11.2022 03:51, Jo=C3=A3o T=C3=A1vora wrote: >> Danny Freeman writes: >>=20 >>> Dmitry Gutov writes: >>> >>>> Then your solution should work okay, but it also means it belongs to t= he category of Eglot hacks (as >>>> opposed to project.el hacks). >>> >>> It is absolutely an Eglot hack :) >> I don't consider this a hack at all. Not only does it work okay, >> it's >> how supposed to work. > > It's a hack because it's a common case which every affected user ends > up fixing through editing their init file. So is every use of add-hook, for that matter. Emacs has an init file because it's not Microsoft Word. The code you're describing is exactly why I added the variable and how I intended it to work when I added 1.5 years ago. That's as far as I'll wade into puerile arguments over who/what is a "hack". >> Most of the time, the default project-finding methods bundled with Emacs >> work extremely well, in fact so well that it seems almost offensive when >> they don't. But it's crucial to recognize that this is not just because >> of LSP reasons. For example, simply because of the relatively poor >> performance of the default project.el VC backend in a gargantuan repo of >> 400k files, I've had to define a different notion of "project" recently. > > Or the OS used, with its different performance characteristics. And > the performance of the W32 Emacs port as well. Anyway, this is beside > the point, since we'll always want more improvements to performance, > of course, to be able to handle larger projects on slower systems. You shouldn't be writing performance off as a detail. You can't just wish it away, or think users will change OSs soon. You should instead think of solutions that help manage size and complexity. But it's not just performance. For example, in this particular project, it makes sense, by default, to grep the superproject, but C-x f in the subprojects. Lack of subproject support in project.el means I have to work around this with defadvice. > If you want more food for thought, look up my previous messages in > this thread regarding "subprojects". And others' too. What about them? I've said all I wanted to say on the matter. If you to make some specific point, make a specific point. > In this thread people are asking for a change in Eglot's behavior, and > not in project-related commands. For example, to keep > 'project-find-file' listing all files in the parent project, not just > in the current subproject. People report problem they are facing. They are free to suggest a real or vapourware design to fix them. My task, as Eglot maintainer, is to understand the problems, consider the suggestions, and often point people to real existing solutions. In this case, Danny figured out exactly how it's supposed to work from the docstrings of eglot-lsp-context and eglot--current-project. All that's needed is to document it in the manual. Alternatively, I've suggested that Danny's code be added to python.el, so that the user need not change init files. And you're of course free to make some egloss.el library that requires eglot.el and has all the LSP paraphernalia you think is missing from Eglot (maybe you'll end up with lsp-mode, who knows?). But I think better tools for configuring very large projects with of shapes and sizes should be in the project management library of Emacs, which is project.el. menawhile, we have the real solutions described above. Jo=C3=A3o