From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70408: 30.0.50; Eglot and Project integration Date: Tue, 16 Apr 2024 15:03:44 +0200 Message-ID: References: <87o7aas3sk.fsf.ref@aol.com> <87o7aas3sk.fsf@aol.com> <86le5djzz2.fsf@gnu.org> Reply-To: Ergus 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="17532"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , Eli Zaretskii , 70408@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 16 15:05:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rwiUx-0004Gw-Di for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Apr 2024 15:05:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwiUh-0001lc-9q; Tue, 16 Apr 2024 09:05:03 -0400 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 1rwiUU-0001l1-Dq for bug-gnu-emacs@gnu.org; Tue, 16 Apr 2024 09:04:51 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwiUU-0008Rh-4i for bug-gnu-emacs@gnu.org; Tue, 16 Apr 2024 09:04:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rwiUg-0003HO-Cw for bug-gnu-emacs@gnu.org; Tue, 16 Apr 2024 09:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Apr 2024 13:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70408 X-GNU-PR-Package: emacs Original-Received: via spool by 70408-submit@debbugs.gnu.org id=B70408.171327265812275 (code B ref 70408); Tue, 16 Apr 2024 13:05:02 +0000 Original-Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 13:04:18 +0000 Original-Received: from localhost ([127.0.0.1]:43842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwiTt-0003BW-Kf for submit@debbugs.gnu.org; Tue, 16 Apr 2024 09:04:17 -0400 Original-Received: from sonic308-1.consmr.mail.bf2.yahoo.com ([74.6.130.40]:42345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwiTn-0003Af-NK for 70408@debbugs.gnu.org; Tue, 16 Apr 2024 09:04:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1713272630; bh=RD6KxhaKTRieCeA/OwFry2Ddwr5inFcoMORbLmWT7YA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=P2Tx1iIO+aFVyzcDQdN8vzT3LuLxC7ArM85yBX0l8u82k8hhMczbcVYO7o08V6KRmhZF3E3BZ0U+GztMEDEh6HGqq2U8JUX6nr+HOl0BtAoh2PynfcWUQeZZP0fu7ks7PG4LM1bCJ8AV0gHakAXdfJKM0+BT/vHmsxIhYFtqnC7qlf/SoiozYSGKe5cSK0UIetD4MAvkFf7OCvpb5R2qYzk3T4EuINJzN1BaXwgnU/+unzfiHb8Qa9jaGia2/HkAEro6ZVqoE1+iO6AQHJmR+BWpzr3J1kgeal6yWI8+S2pQPGJLBpV10zTknSUC8WYgwkdrH2XodzDsi7D4lHhlmw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1713272630; bh=rKLs2HEQVYAtc7kwNRimlpuxhTeXmfQKq+v4Q02FLBH=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=KgaF9D2+yiueoWpCpqpffIOwHo91udqhG/vjaW/01Pj0YQI+6+CQr+LPvDdX3Ult+IzcXQGPGnZSF0RRe0DLU2vv86p9i7q0eUT0ky/euwcrZGcXHSa0suuczgm4ue21vXkig4mDoFjN56u6tSiKlwYxYP8rdd91QbJ6aq2ACjHLNPp6VAcnLtBy67Jlul+xdXEGqLDJK6Xjk4u5VA+tjFB0avzNpaljfage0+W1/JTVUPAP6COJdKm2H4l3VwFiYk6jJWC7PPKHeTBsI5GSXi/2DIwPE53NQnesqjiw418g3Tk1SO8+NGaMniWkwAaF22WI0qVR+V+Uie/RKMJjQg== X-YMail-OSG: bbDyp0QVM1k9dz_zFGEN.u87vGaaekqMHCexbAto3BMyv6rEQ9ptdu2IADwf6Vk 3cMnJD3HVmJVwFHwOoqfwHfGydvV0diQId35fTejrYrYcHoAUuKzlyNdL4td_Dv.VrpejQJw.iU4 _MjzUvmUEAa8MiJ.SSx2_4DvtPRSLHhcK0rcF6HXxI9BNR2xGfQcSAv1xDaHex2rghLQ5llcLV9j NGmU29X0KhECIJgxVmOZnBw3cKTMW50b00YWfuqGSEdHmM_BmjGYqEIxjUz_6rAM5rnOq3nkwyC. mzT98W6Q5tma.CocVxOhTeDLjq0QwL.jOSi7EoSpWjRATto6sPDGvMMgeDp_JALDi_pTTEjF2LTl iI4dx2LnmsNPCz1a3gCE03th2ScYp_3LDjVnKB7uURQx9R7KtmAc1Rug5xE.xYGC2.Ddd6BxHxHd pIgaBJboBCS2KNF0fbZCCIDRKQVVIKYu2EPHbE6eWbP4CoPc4c5PcRUHkynk2DRSlTiFKqmLa28q zaelYt4lwD1zl5yRda70iHQjRSUlO7UFkP9A.pCKJ7CUlGM4NrEjEhB2yDw6gKzfOJU4oAYiyTBw kH8RtSq3G9vpmAtfchPQcdprZvtSdZzBt6XY6wphw7W0IQWZGc5U5lc5TyjM_5_9Z19u0pCrbGbN P29F2fW15RWRmko44K8WEjFlmK3HbVBfeZQLv6a.0emLGvSF.OONS7vzv7bYhkupKMc5NWsKaUef OsgpUy1mTUR7cdwqtv0XPQKStwYZWXwWKJqoUj37lVhKON.xE2gR9Ait74yW7TAhc8ITAKs8sEsE iwe8JJIow8DPlr1gBAFmLuHCePkwTz8S3yrpUay12G X-Sonic-MF: X-Sonic-ID: 9ddf730e-aef7-48f3-a70d-967b5f0dfb13 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.bf2.yahoo.com with HTTP; Tue, 16 Apr 2024 13:03:50 +0000 Original-Received: by hermes--production-ir2-7b99fc9bb6-b6zps (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 7bbeb208d6049d2e17245366a7e7a730; Tue, 16 Apr 2024 13:03:46 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-Mailer: WebService/1.1.22205 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283426 Archived-At: On Tue, Apr 16, 2024 at 01:33:31PM +0100, João Távora wrote: >On Tue, Apr 16, 2024 at 12:42 PM Eli Zaretskii wrote: > >> I think this discussion should include João, so I added him. > >Alright. > >More importantly, I think this discussion should include Dmitry, as this seems >to me a project.el extension. > Indeed. Actually Dmitry suggested me to open the bug. >This discussion should be aware of these half-recent developments >https://github.com/joaotavora/eglot/discussions/1337 > I will give it a look. >In a few words, Eglot user's main gripe with project.el is project.el's >inability to help the user define or designate subprojects within >larger projects. >Eglot has worked around that, and the current work-around is very >effective (though not really well documented beyond that GitHub discussion >forum). > A bit more details on the workaround and its final state may be useful. >If Ergus's developments change project.el so that this special Eglot code >isn't necessary, that's great IMO. If they make it so that Eglot now has >to depend on extra package and extra project.el features, that's not so >great. > I would like to avoid inter-dependencies, however, considering that Eglot and project.el are both in vanilla; maybe we could be a bit flexible here. However, I thing that there are some ways to handle that. So far, what I had in mind was a sort of non-intrusive api (either in eglot or project.el) that could be used by project.el (and/or a project.el backend) to provide more accurate information to eglot. As I said before, the real issue is that project.el is intended to initialize lazily while eglot is generally already running; so the only realistic alternatives I see are: 1. Make eglot call a project.el function to detect the build-dir and compile-commands.json (or equivalent) 2. Make project.el to check if eglot is enabled and call some eglot function to update the eglot's "build-dir". From these two I actually prefer the second one because it may happen that a project has different build-dirs each of them with a different compile-commands.json (i.e debug and release) and the user wants to change build-dir dynamically and potentially inform eglot about the change. >That's my opinion as current Eglot maintainer. A capable future >Eglot maintainer may have another opinion and want to steer ship >in a completely different direction. I'm looking for such a person, btw. > >João