GNU bug report logs - #70408
30.0.50; Eglot and Project integration

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Ergus <spacibba@HIDDEN>; dated Mon, 15 Apr 2024 21:42:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 70408 <at> debbugs.gnu.org:


Received: (at 70408) by debbugs.gnu.org; 20 Apr 2024 11:28:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 20 07:28:57 2024
Received: from localhost ([127.0.0.1]:35855 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ry8tr-0002os-R8
	for submit <at> debbugs.gnu.org; Sat, 20 Apr 2024 07:28:57 -0400
Received: from fout4-smtp.messagingengine.com ([103.168.172.147]:45269)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1ry8tn-0002ni-Mz
 for 70408 <at> debbugs.gnu.org; Sat, 20 Apr 2024 07:28:53 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailfout.nyi.internal (Postfix) with ESMTP id AF0271380DE5;
 Sat, 20 Apr 2024 07:28:31 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Sat, 20 Apr 2024 07:28:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1713612511;
 x=1713698911; bh=HKFXvEjHkdlefXHhjGCqLl2VNgtGK5qE1y8jdabrlPc=; b=
 x8As1xKHB0b1fhH2r5IObzuqslKuOmfDsWGCnNOgi047BhhC+b7rLDPCt+mgX99s
 gWAJaw2kiQ4BkPr5tE8KWBOp5/7SJ6hBK4A2pag2pzxuseZFm8BAWjlZ42OSEmsu
 qoCLcgjtog2zeRSmlCxksr1Vt+KQeqQX72IsF6lnpXc9ypIsCfx1ffxgo8+rshZq
 mZ1ZZ5ezZpiyl3+w2kNaX4TRzTVH7n1r7FVJYpZP0uE+N01QIt/CKRnGOUmKQmTc
 rYoz8/jcgUR0eG5yHEZXGPeSh6/RdDwVkpFDwMGwB2XPzDfDuTKT+dyz9DcCh8Mu
 vm0AGs+s85fC5E7+5EEM9A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1713612511; x=
 1713698911; bh=HKFXvEjHkdlefXHhjGCqLl2VNgtGK5qE1y8jdabrlPc=; b=M
 B4II8RFZAuV9Daein0OEaiWV6xcaotK8ZkMJSOYx5pfzQ/Df3l1Pf+JbMhL1EJX0
 +JPaAyqz7xDa29TgqK2BpcIvSM3HX9zoAd8w+weoU1+4tFLkY5h9j5Y/lSOVvJfP
 L9lro7RJStRyp3CeMfS+PhXEyL5mUQWBF79FramE6Z15I7dW+xyvaugEb4z8ccHu
 VEQSb3Q2fcB7WiOn+vciXFEzEidId6nezOAXrjdFH0mB70orvpbD22nu+1tu5Ikd
 O+XvF4/WGY0PAMewN9OAjpvPWcayJt3HDz2b9guXQjjFpGPf4tAX3Ai0Qm3Ki42o
 KffsZ8x2K5LBtWKYnD5MQ==
X-ME-Sender: <xms:36YjZjvSJZ_b-V2-6fLlQwPu338XGX-LrffqWV7QV7SuXqKpukgfvw>
 <xme:36YjZkehVf4106JjUETQ-0uyAUZ2TqsJlfkI_2OQCnW03ihyn2LzKSjUkl0JYfZ5Y
 5-Y9SnP3hLv6sNhCHc>
X-ME-Received: <xmr:36YjZmzNL3CaA06Jcf-YV-npM_7uRhaDW3khd_Im3ahdWLqLUUA26mMo1M_dQHGLLcfDBpd8UhuHObD9-PQowUV2xJFBRleqcIs>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudekgedggedtucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepueetudfhiedtjeekuefffeehgfffveevteejtdfhteetgeethfevueejkeej
 gfevnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc
 frrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:36YjZiPrXAM9OKeI6TFax5aJxwnXXoalKzT8iL5iquErPSiEU4H5Ng>
 <xmx:36YjZj9UWUQeQ9gjB5svh5R6yNuAIu_NBme0MvdSn9DIvia3-77uUw>
 <xmx:36YjZiUVtCi3Pl9K6QNJVIDNU-xuuCuBwai1DDgo1wJDyRaUiWpgYQ>
 <xmx:36YjZkfQZSZzV6wh4-dD5gEyDzCSMZUg_gEZQ5rBxRg5_RWSA_ysWQ>
 <xmx:36YjZvaAsLck-7KFO1-N_xZLTCcs1-VoRtgnIVNX_yxvUFBxAdkeHkGc>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 20 Apr 2024 07:28:30 -0400 (EDT)
Message-ID: <51785013-d847-4a1d-a5df-3b25dcf1084c@HIDDEN>
Date: Sat, 20 Apr 2024 14:28:26 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#70408: 30.0.50; Eglot and Project integration
To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
References: <87o7aas3sk.fsf.ref@HIDDEN> <87o7aas3sk.fsf@HIDDEN>
 <86le5djzz2.fsf@HIDDEN>
 <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
 <8cfba95b-fedd-4b5f-9778-d656601006d1@HIDDEN>
 <CALDnm523AaU1CUkzELpBMtOnEe=2v=ucnpd_uRyvQx7p18DV+w@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <CALDnm523AaU1CUkzELpBMtOnEe=2v=ucnpd_uRyvQx7p18DV+w@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70408
Cc: Eli Zaretskii <eliz@HIDDEN>, 70408 <at> debbugs.gnu.org,
 Ergus <spacibba@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 16/04/2024 16:51, João Távora wrote:
> On Tue, Apr 16, 2024 at 1:56 PM Dmitry Gutov <dmitry@HIDDEN> wrote:
> 
>> IIUC Ergus's request is primarily about a situation where an
>> "out-of-tree" build is used. Meaning, the directory for build artefacts
>> is not a subdirectory of the project root, but -- apparently -- some
>> sibling directory of it (e.g. "../build"). So it's somewhat atypical,
>> although I suppose the solution from the link above might work with it too.
> 
> Ah, I know about that.  That's where compile-commands.json is generated
> by CMake.  But using that './build' as the project root passed via LSP
> to clangd
> (and likely any other server) will most likely fail: that's not  the
> project root
> and it doesn't have any versioned source files  (only auto-generated ones).
> 
> Because of this, C++ projects usually have sth like:
> 
>    ln -sf build/compile_commands.json compile_commands.json
> 
> as a build step.

Would you say it's common across most projects? E.g. generated as a 
build step by CMake in out-of-tree comfigurations.

Or is it something Emacs users tend to add.

What I'm wondering is whether we might be currently disadvantaged 
compared to the users of some other editors, which might have some more 
auto-detection in that area.

> Alternatively, you invoke clangd with `--compile-commands-dir=build`.
> I don't think there's anything project.el or Eglot can do or should do
> about this case.
> 
>> This bug is split off from an emacs-devel discussion, where I posted a
>> draft solution of mine:
>> https://lists.gnu.org/archive/html/emacs-devel/2024-04/msg00279.html
>> I'm curious for any feedback - like would that be good enough for this
>> and related cases, or maybe if someone has an even simpler approach in mind.
> 
> I'll pass, but wish you luck.  I've stated in the past that I think
> project.el should
> allow subprojects inside larger projects, and let users of
> project-current (direct
> or indirect) specify if they're interesting in the innermost,
> outermost, or intermediate
> projects when searching for projects to act on, via a combination of prefix
> arguments, arguments, customized special variables or let-bound special
> variables.

I'm open to continuing this discussion somewhere, but it's unrelated to 
this particular one. Note that, as I explained, it would be easy to 
create a set of commands acting on "super" projects, but that's probably 
not what you're looking for.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.

Message received at 70408 <at> debbugs.gnu.org:


Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 21:51:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 17:51:47 2024
Received: from localhost ([127.0.0.1]:45267 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwqiR-0004xG-8l
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2024 17:51:47 -0400
Received: from sonic311-14.consmr.mail.bf2.yahoo.com ([74.6.131.124]:37341)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1rwqiO-0004wF-Op
 for 70408 <at> debbugs.gnu.org; Tue, 16 Apr 2024 17:51:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1713304286; bh=cBn/90TO5rbqhoUzTnmbcL9Ud++Quna/mOCaJfxeAoU=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To;
 b=im6dsxD9DqdncROmfaXAe7yE9Yf5WMIkRPvoj1dHASP1ITlqyjdqalVgTGXCedcuAhEpt4RmwHSWm4t0x7YTu7+2lzBtyUzZuYnIpp21DaVjbWEwU47o5H7ANTVVwquLXoRdcyomHNrxKFxufiQgUtlFo4JTN4668iDd8KUwfs1Zg1ZoWRyW1Y3hHsnT5MLdZqRuwrVMr+pcB0/hWvoTpKuesJKBTckkiTAMDhJ+q6SJ8UeauC7i8s4hHSBP5BypSNd4xxyxKhuFNVq7feHdKNS+UK6Z5lfDIQ5zcdzCHdzyFlFn6xyQtMtpk56T9rDAWvboFbAH2rUbCvHV6Uy4qg==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1713304286; bh=WATP2ajQ772Zu5Suo4+7/JrUoX8ZL4eOfcP6O3FQRmZ=;
 h=X-Sonic-MF:Date:From:To:Subject:From:Subject;
 b=JLp0pMAzUoI17r315/vYwIDlIxkQbcuJ0Cokdq3qSGF9EsVZ4fDsGOyvdXAM50RoN1Cp0HIu6CZ3K5FoqOtBCEfUfeO/TZAgOm0bZ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iCRMSYXdmoYlfRhZcF30uO0jNNlm.eFZwCqbqnEGqFe3g7Q
 mhuUXM_dvOT2uEtbFHM7C53LDXv54XoQIn1qkAYxoFXxzyYB63LXGK0jLS2BYPkMCTtmwbH7zcYd
 SeoQeHwoI48oEM7HYLxd1qxRn51wn7ejOMyuQ9sdE7jqEHA8saZfNU.vz0SWs9HaCH8sf0LwFl9.
 j3DgwJ4npnjX9TfoFHhW2OdqkKoonfGad9FrBv4JZO32m0EtdhRxbQxwwJr4bTt5ETTfjVAMQn4X
 ykV924EFULk9Q5DgRGJPnhjM7ZSznaB7pfnmzEsSWObE6rbu1f8jL4kEyWGOYr8wPpGTJ31kShiH
 TXYSQkLC_sZR81fjwHZKMdwWum_.2uzoH1RFNH2bSOJYGbZnAcxGXgu6pycwF8i4oLjyvW4I10ia
 QgV2f
X-Sonic-MF: <spacibba@HIDDEN>
X-Sonic-ID: c5d01afc-6b03-4af1-9a5c-cd76bbff58c6
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic311.consmr.mail.bf2.yahoo.com with HTTP; Tue, 16 Apr 2024 21:51:26 +0000
Received: by hermes--production-ir2-7b99fc9bb6-dmk2d (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID 15d096af254d841005b96440493d9304; 
 Tue, 16 Apr 2024 21:51:23 +0000 (UTC)
Date: Tue, 16 Apr 2024 23:51:21 +0200
From: Ergus <spacibba@HIDDEN>
To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Subject: Re: bug#70408: 30.0.50; Eglot and Project integration
Message-ID: <6mr2uvovmws5qbowuqnh332tncdueanvxbucsoazzoykjythsf@k5eo2mzccf5w>
References: <87o7aas3sk.fsf.ref@HIDDEN> <87o7aas3sk.fsf@HIDDEN>
 <86le5djzz2.fsf@HIDDEN>
 <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
 <8cfba95b-fedd-4b5f-9778-d656601006d1@HIDDEN>
 <CALDnm523AaU1CUkzELpBMtOnEe=2v=ucnpd_uRyvQx7p18DV+w@HIDDEN>
 <3i7r7yspjdbjtlyrc6ry3vi4rbsxvm52axyehk3dn4ykjltndh@aqizn4e6dflm>
 <CALDnm51NwMHwUPWjQwkXXXSc0wRndGKdrqwtfPf6WsmNPYD6Wg@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CALDnm51NwMHwUPWjQwkXXXSc0wRndGKdrqwtfPf6WsmNPYD6Wg@HIDDEN>
X-Mailer: WebService/1.1.22205
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol
Content-Length: 2407
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70408
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 70408 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Apr 16, 2024 at 09:30:20PM +0100, João Távora wrote:
>On Tue, Apr 16, 2024 at 5:02 PM Ergus <spacibba@HIDDEN> wrote:
>
>> project-multi--merge-plist is just a hack function to merge the
>> eglot-workspace-configuration value without overriding the existing
>> sub-values if already set (in case the user sets some sub-values in the
>> dir locals then those takes precedence)
>>
>> Then this restarts eglot
>>
>> IIUC this is equivalent to call `--compile-commands-dir=build` and at
>> the moment is working for me.
>
>This seems extremely complicated, but happy it works for you.
>
The core idea is actually very simple: if project.el detects a
build-dir with compile-commands.json inside then update
eglot-workspace-configuration. The rest is just the api to set directory
local vars (extremely complicated indeed, but that's what it is)

>If during an eglot session something happens that leads to want to update
>the "workspace configuration" for a given session, you can set it and
>then call `eglot-signal-didChangeConfiguration` which is part of Eglot's
>API. No need to restart.  Also note that eglot-workspace-configuration
>can be a function, maybe that's useful to you somehow.
>
This is actually very useful; it is probably the only feature I needed
in the eglot side.

>> At the moment I assume the outer most only; which is the simpler one to
>> setup and implement woth the current project.el support. The main goal I
>> have is OOSC, not nested projects.
>
>OK.  I don't know what OOSC is but if it's somehow related to "out of tree
>builds" 
Out Of Sources Compilation

>I think these are fine, but builds aren't normally not part of a project:
>my
>.gitignore files ignores them.
>
Indeed, but my function in project.el won't.

The code I wrote considers some file-names as root hints (i.e
CMakeLists.txt) and others as build dirs hints (i.e CMakeCache.txt).

My project-find-functions hook searches upwards in the directory trees
for a root hint and in the top most root it searches not recursively for
the build dir hint in the root's sub-directories.

When there are multiple build dirs it asks to the user for which one to
use.

And after that it searches for the compile-commands.json there.

The code also sets a directory-local-var to avoid repeating this search
for all the other files in the future; because I use Tramp extensively
and such searches may slow.

>João




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.

Message received at 70408 <at> debbugs.gnu.org:


Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 20:30:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 16:30:54 2024
Received: from localhost ([127.0.0.1]:45151 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwpSA-0003q6-GD
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2024 16:30:54 -0400
Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:57850)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1rwpS6-0003pi-Nm
 for 70408 <at> debbugs.gnu.org; Tue, 16 Apr 2024 16:30:53 -0400
Received: by mail-lf1-x12b.google.com with SMTP id
 2adb3069b0e04-516d3a470d5so5642277e87.3
 for <70408 <at> debbugs.gnu.org>; Tue, 16 Apr 2024 13:30:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713299432; x=1713904232; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=LiMxM8Xc88RlVa4++2oNlffjlcfn2XZI3g4Kl4F+cGY=;
 b=I22TsirvkmXUdg4p9OnuwOpFt9UU0/UpW1AO+Ude1kFgv6UP9jIEppG5YGeyFzEOPT
 nnTHHFvfKozcWXlI1QQ9NN8T1A3XUGcGSSPDNBdJtRamVJ+T6/Wx3wyq+JdDsE8njrai
 t77328ZtjGk+5/iIHBFQIPA0tTdkx1XRg1rSgZUJvcCXbmV8uO6v0b3lExObDrXXpBGC
 ZnoKgRqZhYw4/cJMyYW2PqAYVunMfaY4nmRLzUSqNWvLlCuKVdYwjhY7D5exSpuf4YCQ
 PAHW3sLJNNdzUV0ZfVq0yBSO0RMK7LLkQ4NZR2kpKJ5WLQde2DJQpU25nJVd0MnEMjjJ
 AK8A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713299432; x=1713904232;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=LiMxM8Xc88RlVa4++2oNlffjlcfn2XZI3g4Kl4F+cGY=;
 b=Sa+GJX8lyTv/eRHmnheo1OSPUGdl1XC8cNuQkxPF+srqZzgW/ah4LVm05WFq+MMcSP
 AdzTNKh0t859rd95eNwCJ2H4xhCFcg2Dle9W7P1HpDpIiX1pUTW67TkZQwfvPUdY/Axq
 ZUAsPQJnpDMWAZHJarBZrgNd2rt/RUR5i1g0MSBpe68aspBVOCflJqubCLPWnoaa7STc
 YMyXUcPbSPBaJ2OsfZNAMrU/yUkmzlBZANmxtGZ8hmg+k5p42cKUY0uwACkS+bPdY8la
 PVY+843yuLw9JVOBE7twMXN0UH0oHeA3yld/RL73wG680e8pyZssPy9UZdiqHpFxk9Kz
 TcOA==
X-Forwarded-Encrypted: i=1;
 AJvYcCUP8uDDWtQT7xxU/ARn2DjltjlF1v58AUVoQfs+HFa7R3BnDeNab42ZVwyJeeiLQOiY/57bdngNmC/vLZC5IAfpYaH55KY=
X-Gm-Message-State: AOJu0YwGEaOzhzxrCgtMz968Q2IzfyAdN3UT5QqqMOH9h2Dr1iN0k5us
 6NuU2kHL35K17UUWcLIlo/BK2kO4orh88k3vH8XcDh4Kn4kWjx6KOAW11b0Kg4qzaStsa2LiGFZ
 E39CJkp79tJndMou8FdCYSJ/0NrI=
X-Google-Smtp-Source: AGHT+IEVNulspXA36tytcZ/xTOuip9ecuq14gHSx5i8ABOGrEWshc2rO3gfiZ1fC6nyK2GCVjkgZrahvGW7qGJP6298=
X-Received: by 2002:a05:6512:acd:b0:518:9138:4c93 with SMTP id
 n13-20020a0565120acd00b0051891384c93mr9259389lfu.63.1713299431905; Tue, 16
 Apr 2024 13:30:31 -0700 (PDT)
MIME-Version: 1.0
References: <87o7aas3sk.fsf.ref@HIDDEN> <87o7aas3sk.fsf@HIDDEN>
 <86le5djzz2.fsf@HIDDEN>
 <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
 <8cfba95b-fedd-4b5f-9778-d656601006d1@HIDDEN>
 <CALDnm523AaU1CUkzELpBMtOnEe=2v=ucnpd_uRyvQx7p18DV+w@HIDDEN>
 <3i7r7yspjdbjtlyrc6ry3vi4rbsxvm52axyehk3dn4ykjltndh@aqizn4e6dflm>
In-Reply-To: <3i7r7yspjdbjtlyrc6ry3vi4rbsxvm52axyehk3dn4ykjltndh@aqizn4e6dflm>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Tue, 16 Apr 2024 21:30:20 +0100
Message-ID: <CALDnm51NwMHwUPWjQwkXXXSc0wRndGKdrqwtfPf6WsmNPYD6Wg@HIDDEN>
Subject: Re: bug#70408: 30.0.50; Eglot and Project integration
To: Ergus <spacibba@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000000860bb06163c9cbc"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70408
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 70408 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000000860bb06163c9cbc
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 16, 2024 at 5:02=E2=80=AFPM Ergus <spacibba@HIDDEN> wrote:

> project-multi--merge-plist is just a hack function to merge the
> eglot-workspace-configuration value without overriding the existing
> sub-values if already set (in case the user sets some sub-values in the
> dir locals then those takes precedence)
>
> Then this restarts eglot
>
> IIUC this is equivalent to call `--compile-commands-dir=3Dbuild` and at
> the moment is working for me.

This seems extremely complicated, but happy it works for you.

If during an eglot session something happens that leads to want to update
the "workspace configuration" for a given session, you can set it and
then call `eglot-signal-didChangeConfiguration` which is part of Eglot's
API. No need to restart.  Also note that eglot-workspace-configuration
can be a function, maybe that's useful to you somehow.

> At the moment I assume the outer most only; which is the simpler one to
> setup and implement woth the current project.el support. The main goal I
> have is OOSC, not nested projects.

OK.  I don't know what OOSC is but if it's somehow related to "out of tree
builds"
I think these are fine, but builds aren't normally not part of a project:
my
.gitignore files ignores them.

Jo=C3=A3o

--0000000000000860bb06163c9cbc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tue, Apr 16, 2024 at 5:02=E2=80=AFPM Ergus &lt;<a href=
=3D"mailto:spacibba@HIDDEN">spacibba@HIDDEN</a>&gt; wrote:<br><br>&gt; pr=
oject-multi--merge-plist is just a hack function to merge the<br>&gt; eglot=
-workspace-configuration value without overriding the existing<br>&gt; sub-=
values if already set (in case the user sets some sub-values in the<br>&gt;=
 dir locals then those takes precedence)<br>&gt;<br>&gt; Then this restarts=
 eglot<br>&gt;<br>&gt; IIUC this is equivalent to call `--compile-commands-=
dir=3Dbuild` and at<br>&gt; the moment is working for me.<br><br>This seems=
 extremely complicated, but happy it works=C2=A0for you.<div><br></div><div=
>If during an eglot session something happens that leads to want to update=
=C2=A0</div><div>the &quot;workspace configuration&quot; for a given sessio=
n, you can set it and=C2=A0</div><div>then call `eglot-signal-didChangeConf=
iguration` which is part of Eglot&#39;s=C2=A0</div><div>API. No need to res=
tart.=C2=A0 Also note that eglot-workspace-configuration=C2=A0</div><div>ca=
n be a function, maybe that&#39;s useful to you somehow.<div><br>&gt; At th=
e moment I assume the outer most only; which is the simpler one to<br>&gt; =
setup and implement woth the current project.el support. The main goal I<br=
>&gt; have is OOSC, not nested projects.<br><br>OK.=C2=A0 I don&#39;t know =
what OOSC is but if it&#39;s somehow related to &quot;out of tree builds&qu=
ot; <br>I think these are fine, but builds aren&#39;t normally not part of =
a project: my <br>.gitignore files ignores them.</div></div><div><br></div>=
<div>Jo=C3=A3o</div></div>

--0000000000000860bb06163c9cbc--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.

Message received at 70408 <at> debbugs.gnu.org:


Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 16:37:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 12:37:13 2024
Received: from localhost ([127.0.0.1]:44840 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwlnz-000762-Rm
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2024 12:37:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60238)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rwlnw-00074j-Qk
 for 70408 <at> debbugs.gnu.org; Tue, 16 Apr 2024 12:37:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rwlne-0005bj-Bc; Tue, 16 Apr 2024 12:36:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=DJdSGwxYsh3bxRUfZR2r20UEm2KgkrztJxe/vp++xr0=; b=iZY2roYLJhVF+8XI7UZS
 lCQYKnZCD+yLmBArpsvNxkr6K6UaiRSuA8Qj307jxAW+mh28mNA8YkRT63BtHkBlgohEFN36UVvGL
 DII7/VK8fgY3Ffw9n7fJE4ANgbQwIoT2dJIFHbnJpqHPUFmqZx8Husug/U1kdunhY/VHmGmRxKXqf
 vo068gah19lP/B74rJ1rMjlG+bzUQy9flXSbXsdW0qnm1B8C//xIQxv3cQvtKrb5RjUHJGFejwlcr
 JODikB3PQ5idOoZumNFqQpxnOt93pVfgQyoCbF6uy/wTVHwN3Vxaw1CFcoSAuwiANsY+/M7Ov8qgw
 IcefNgI+1z96zw==;
Date: Tue, 16 Apr 2024 19:36:47 +0300
Message-Id: <86o7a9i7s0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
In-Reply-To: <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
 (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Tue, 16 Apr 2024 13:33:31
 +0100)
Subject: Re: bug#70408: 30.0.50; Eglot and Project integration
References: <87o7aas3sk.fsf.ref@HIDDEN> <87o7aas3sk.fsf@HIDDEN>
 <86le5djzz2.fsf@HIDDEN>
 <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70408
Cc: dmitry@HIDDEN, spacibba@HIDDEN, 70408 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: João Távora <joaotavora@HIDDEN>
> Date: Tue, 16 Apr 2024 13:33:31 +0100
> Cc: Ergus <spacibba@HIDDEN>, 70408 <at> debbugs.gnu.org
> 
> On Tue, Apr 16, 2024 at 12:42 PM Eli Zaretskii <eliz@HIDDEN> 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.

Of course.  However, Dmitry reads the bug list, so I reckoned he
didn't need this discussion to be forwarded to him.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.

Message received at 70408 <at> debbugs.gnu.org:


Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 16:02:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 12:02:44 2024
Received: from localhost ([127.0.0.1]:44663 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwlGa-0000Ew-VT
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2024 12:02:44 -0400
Received: from sonic311-14.consmr.mail.bf2.yahoo.com ([74.6.131.124]:38966)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1rwlGW-0000Df-6s
 for 70408 <at> debbugs.gnu.org; Tue, 16 Apr 2024 12:02:39 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1713283338; bh=i0VWL7wRFPBJNcgwAVU5UZKVhatzH+M1R4Vn7PS44F4=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To;
 b=HHDPITqoKNY6+wYJMxfBfWJBko/Yi7sIXGozi1ra6jjkrrXVKYerdF3EK0D0oJgW7kKa07QE0DqpCG8OYDAvu1/KijBu7/HY18Mentby+nyaU9H6dM4Om3aQZiLh0mDqVxqBrBIQNg1GSwZRLD2bxZkmNWHKUagh0qcH7yDG4Do+r4NswxeZDroWFNX7sWJrB+VCDZ4cFQxo9494UkDU4fZaWpD0YeJATu/rWldjF6sVDANRQulBRt4u8E+Ef0ew3zlTdlI3My2wtpk0gPeNSwjNUASr61bBKC9DsIPEXTUks0dPkhzC+e0IQhn0soWo3XdHBW/xH5cLTulEpfwRCQ==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1713283338; bh=UphuMd+zYL5gwut8Gpp1EyL/Z55pa9PYyc4yog7uAcW=;
 h=X-Sonic-MF:Date:From:To:Subject:From:Subject;
 b=HpJDJfxNiTHo9BqB4YVu8gj6oASG+ei+Nc8ZgN5U5gGYL7MAqRwYI6ANielFpasL7bIup5bjGTCbCwuuDzHYMlM04v8/+yxbh08fjZstjWNt7xi6vZd0VM2dBuy08arv4/ZLjFNdAOR+rOOw1v5vcu5M2p256rEfKBzDL8/ZzNOMMlgVh7Pz/ZYS0JrjPxJ74iXl1TuWVhuySnt8eSu4Egvx2n0eXxWVt0SFv+zJmVik8Qj/eDbDPTk22Y8gHGCVNdbIcjiuV29wGIbwNU6D5+pxW9rXOBJDaLCl34sC9JnzIZlhpG+uc8F7YR0NYQhaq4huidAp5NS1qLusaRCiLA==
X-YMail-OSG: 5HVtyE8VM1k5mTd7PXGmNWJiKCEmiCaoA_ekY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zrku8sI3bZvApcjN7Sk9vzxwRzo6R6GFrdaz8_Gnw0Uwe
 9kvXSeVYnoKn_qwHP43IXEQuxRQteBFkKhHCo0h93R2cypXTAJ0Hv7rV2wREU9jkm3KeaO08IBkl
 fpmDaTw--
X-Sonic-MF: <spacibba@HIDDEN>
X-Sonic-ID: eb0c9abc-d5f2-4ce7-b367-0b260b20435a
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic311.consmr.mail.bf2.yahoo.com with HTTP; Tue, 16 Apr 2024 16:02:18 +0000
Received: by hermes--production-ir2-7b99fc9bb6-9sm2s (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID 82b03ee34769c2254398d3d2aadbf6b8; 
 Tue, 16 Apr 2024 16:02:12 +0000 (UTC)
Date: Tue, 16 Apr 2024 18:02:10 +0200
From: Ergus <spacibba@HIDDEN>
To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Subject: Re: bug#70408: 30.0.50; Eglot and Project integration
Message-ID: <3i7r7yspjdbjtlyrc6ry3vi4rbsxvm52axyehk3dn4ykjltndh@aqizn4e6dflm>
References: <87o7aas3sk.fsf.ref@HIDDEN> <87o7aas3sk.fsf@HIDDEN>
 <86le5djzz2.fsf@HIDDEN>
 <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
 <8cfba95b-fedd-4b5f-9778-d656601006d1@HIDDEN>
 <CALDnm523AaU1CUkzELpBMtOnEe=2v=ucnpd_uRyvQx7p18DV+w@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CALDnm523AaU1CUkzELpBMtOnEe=2v=ucnpd_uRyvQx7p18DV+w@HIDDEN>
X-Mailer: WebService/1.1.22205
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol
Content-Length: 3962
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 70408
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 70408 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

On Tue, Apr 16, 2024 at 02:51:10PM +0100, João Távora wrote:
>On Tue, Apr 16, 2024 at 1:56 PM Dmitry Gutov <dmitry@HIDDEN> wrote:
>
>> IIUC Ergus's request is primarily about a situation where an
>> "out-of-tree" build is used. Meaning, the directory for build artefacts
>> is not a subdirectory of the project root, but -- apparently -- some
>> sibling directory of it (e.g. "../build"). So it's somewhat atypical,
>> although I suppose the solution from the link above might work with it too.
>
>Ah, I know about that.  That's where compile-commands.json is generated
>by CMake.  But using that './build' as the project root passed via LSP
>to clangd
>(and likely any other server) will most likely fail: that's not  the
>project root
>and it doesn't have any versioned source files  (only auto-generated ones).
>
>Because of this, C++ projects usually have sth like:
>
>  ln -sf build/compile_commands.json compile_commands.json
>
>as a build step.
>
>Alternatively, you invoke clangd with `--compile-commands-dir=build`.
>I don't think there's anything project.el or Eglot can do or should do
>about this case.
>
What my POC workaround does is basically call a hook that updates
`eglot-workspace-configuration` as a root's directory-local variable
the first time project-current is called within a project.


```
(defun project-multi--set-eglot (plist)
   "Set the eglot variables in root's PLIST when possible."
   (when-let* ((compile-dir (project-extra-info (project-current) :compile-dir))
	      (file-exists-p (expand-file-name "compile_commands.json" compile-dir)))

     (let* ((symvars (intern (format "eglot-multi--%s" compile-dir)))
	   (eglot-complete (project-multi--merge-plist ;; merge with new values
			    (bound-and-true-p eglot-workspace-configuration)
			    `(:clangd (:initializationOptions
				       (:compilationDatabasePath ,compile-dir))))))

       ;; set the dir local variables, they will apply automatically to
       ;; all buffers open in the future within the project root
       (dir-locals-set-class-variables
        symvars
        `((nil . ((eglot-workspace-configuration . ,eglot-complete)))))

       (dir-locals-set-directory-class (project-root (project-current)) symvars)

       ;; set the variable manually in all the already opened buffers
       ;; TODO: JAM check if the variable is not already set in the other buffers??
       ;; Probably override only the value instead of replacing the whole variable?
       (mapc (lambda (buffer)
	      (with-current-buffer buffer
		(setq-local eglot-workspace-configuration eglot-complete)))
	    (project-buffers (project-current))))))
```

project-multi--merge-plist is just a hack function to merge the
eglot-workspace-configuration value without overriding the existing
sub-values if already set (in case the user sets some sub-values in the
dir locals then those takes precedence)

Then this restarts eglot

IIUC this is equivalent to call `--compile-commands-dir=build` and at
the moment is working for me.


>> This bug is split off from an emacs-devel discussion, where I posted a
>> draft solution of mine:
>> https://lists.gnu.org/archive/html/emacs-devel/2024-04/msg00279.html
>> I'm curious for any feedback - like would that be good enough for this
>> and related cases, or maybe if someone has an even simpler approach in mind.
>
>I'll pass, but wish you luck.  I've stated in the past that I think
>project.el should
>allow subprojects inside larger projects, and let users of
>project-current (direct
>or indirect) specify if they're interesting in the innermost,
>outermost, or intermediate
>projects when searching for projects to act on, via a combination of prefix
>arguments, arguments, customized special variables or let-bound special
>variables.
>
At the moment I assume the outer most only; which is the simpler one to
setup and implement woth the current project.el support. The main goal I
have is OOSC, not nested projects.

>João




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.

Message received at 70408 <at> debbugs.gnu.org:


Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 13:51:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 09:51:46 2024
Received: from localhost ([127.0.0.1]:44072 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwjDs-0000ZY-Pa
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2024 09:51:46 -0400
Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:59783)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1rwjDo-0000Xy-Mi
 for 70408 <at> debbugs.gnu.org; Tue, 16 Apr 2024 09:51:43 -0400
Received: by mail-lf1-x12e.google.com with SMTP id
 2adb3069b0e04-516d0162fa1so5635742e87.3
 for <70408 <at> debbugs.gnu.org>; Tue, 16 Apr 2024 06:51:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713275482; x=1713880282; darn=debbugs.gnu.org;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=zLb6Xy82cyIjUP3TNr/NshuXhLBuNLGnG9HbAWClir8=;
 b=EwD4XDdbQunHbyRxIttK1qaXBF3980ZOGeuR0Ryvi6a8MmpZuvdHDn3hCj3+CoE/In
 3jQVOonb84NtKeJ4ELfrcyLMT2tFvILfBqzcc/WblL0GaTORDedjxzo7gMvQwILbd6WM
 gckUSDBQePiflNDmEpDf1cE7W6S7JKUupuK09AWs9r8/DkEsbwYyEq+MGGy8GsTEIDk/
 dERFev0DNrypwz6V+I+EVyEfFbmBwSpLw1NstugrbWdDnu1Fz+VgYMcvFKPZjn28uIvU
 0vih4tk+31GEJt8/XDAO/D6pLXgCPG4+jiImpFOjKiw1q8JTofk8gWR2q3GJYadiJJxe
 j7aQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713275482; x=1713880282;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=zLb6Xy82cyIjUP3TNr/NshuXhLBuNLGnG9HbAWClir8=;
 b=CxKXyU1AwzaKYq/w2NgQEJ4u89V/z5ZJTZ97hOoalWjGYKZqmlRfHM2j6G/ocGwMK/
 NuO+HLpx6WtpZu6fd2DBOQrV9n5Wdzj0uFFBnwarQQLPGPeaT5voeK8/wztAXvDmUOfg
 IG3H7vY11tZicW4qA9LI4gsFQWyo39fW567juG7bc620dDgyTHAgA/m9yuuVp7Kmk2ru
 y17CN/uAE+Z+j4CICcjF19Kxuri/VXXasTnccqECj30F0085tYsw8gEH7GzfoTNk6Pn2
 3l1KaQculBJ2W+pE4+C1f4b+4b35eSESNuXEANp2mnKnENoJeM4LE5rL6ogjFXjjDNyz
 7Kcg==
X-Forwarded-Encrypted: i=1;
 AJvYcCW2lIA6/ZcPZ/8EOz2pNlpqpb3ZYZLvts03P+Hj3D8rgz3qHOb4rMJaD9BqUn5+LLB/U8jGLEB+dU8DZIRoMjgv8HlJF5A=
X-Gm-Message-State: AOJu0YzLC5YAy6tEBevgnGf7Ab+pV6F4XuhEvT+SOP36skzd0IfGJqC5
 SAwNdKBHi+cXOkCXeJuI3ujQ+O3+NgQsdXq0v79QXAjnXv9ERkyHF3T6QUiDDCQc5Y9xHwq31ut
 1z/h7t/zv0MAyUPvetY5Hn8OFCAE=
X-Google-Smtp-Source: AGHT+IEf6bUmtk4tqMIOTUt56gjUfphBB/bf+qlnF08h29t+GD85ZH03QQ8j7Ad8BhYkosBkiayziDR8wu/k/OkBIPQ=
X-Received: by 2002:a05:6512:318d:b0:519:2e3d:205 with SMTP id
 i13-20020a056512318d00b005192e3d0205mr1200785lfe.69.1713275482029; Tue, 16
 Apr 2024 06:51:22 -0700 (PDT)
MIME-Version: 1.0
References: <87o7aas3sk.fsf.ref@HIDDEN> <87o7aas3sk.fsf@HIDDEN>
 <86le5djzz2.fsf@HIDDEN>
 <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
 <8cfba95b-fedd-4b5f-9778-d656601006d1@HIDDEN>
In-Reply-To: <8cfba95b-fedd-4b5f-9778-d656601006d1@HIDDEN>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Tue, 16 Apr 2024 14:51:10 +0100
Message-ID: <CALDnm523AaU1CUkzELpBMtOnEe=2v=ucnpd_uRyvQx7p18DV+w@HIDDEN>
Subject: Re: bug#70408: 30.0.50; Eglot and Project integration
To: Dmitry Gutov <dmitry@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 70408
Cc: Eli Zaretskii <eliz@HIDDEN>, 70408 <at> debbugs.gnu.org,
 Ergus <spacibba@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

On Tue, Apr 16, 2024 at 1:56=E2=80=AFPM Dmitry Gutov <dmitry@HIDDEN> wro=
te:

> IIUC Ergus's request is primarily about a situation where an
> "out-of-tree" build is used. Meaning, the directory for build artefacts
> is not a subdirectory of the project root, but -- apparently -- some
> sibling directory of it (e.g. "../build"). So it's somewhat atypical,
> although I suppose the solution from the link above might work with it to=
o.

Ah, I know about that.  That's where compile-commands.json is generated
by CMake.  But using that './build' as the project root passed via LSP
to clangd
(and likely any other server) will most likely fail: that's not  the
project root
and it doesn't have any versioned source files  (only auto-generated ones).

Because of this, C++ projects usually have sth like:

  ln -sf build/compile_commands.json compile_commands.json

as a build step.

Alternatively, you invoke clangd with `--compile-commands-dir=3Dbuild`.
I don't think there's anything project.el or Eglot can do or should do
about this case.

> This bug is split off from an emacs-devel discussion, where I posted a
> draft solution of mine:
> https://lists.gnu.org/archive/html/emacs-devel/2024-04/msg00279.html
> I'm curious for any feedback - like would that be good enough for this
> and related cases, or maybe if someone has an even simpler approach in mi=
nd.

I'll pass, but wish you luck.  I've stated in the past that I think
project.el should
allow subprojects inside larger projects, and let users of
project-current (direct
or indirect) specify if they're interesting in the innermost,
outermost, or intermediate
projects when searching for projects to act on, via a combination of prefix
arguments, arguments, customized special variables or let-bound special
variables.

Jo=C3=A3o




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.

Message received at 70408 <at> debbugs.gnu.org:


Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 13:04:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 09:04:17 2024
Received: from localhost ([127.0.0.1]:43842 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwiTt-0003BW-Kf
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2024 09:04:17 -0400
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 <spacibba@HIDDEN>) id 1rwiTn-0003Af-NK
 for 70408 <at> 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/2DIwP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Rdalg
 QwtaX5Q20E37ymgGWkrIqN9uWUrQRh7SBjO.wliNjo07iT7_89EFLtcf.nimWE5Jjm0oY_r3sviP
 Gf_9XwA4pALyan95qszzrUgV8JIk5lLwSSdYCi5Ti3HPRG4MhRpD4hXIuW66dnMJpXkKgDiP_tMO
 y4cN_AIxFTyzne1xmKMr3rhhIH.nBKjSg9PI57eKZnq9gDkPl7Hm2V_pPz63X825vt0gVxAAHvga
 Yw8Q-
X-Sonic-MF: <spacibba@HIDDEN>
X-Sonic-ID: 9ddf730e-aef7-48f3-a70d-967b5f0dfb13
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
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)
Date: Tue, 16 Apr 2024 15:03:44 +0200
From: Ergus <spacibba@HIDDEN>
To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Subject: Re: bug#70408: 30.0.50; Eglot and Project integration
Message-ID: <mrfdqsap7lxrxjsxkdtpvoud5gzknmfvbj4owz5ieknehpbbmc@5f3vfph5tyq6>
References: <87o7aas3sk.fsf.ref@HIDDEN> <87o7aas3sk.fsf@HIDDEN>
 <86le5djzz2.fsf@HIDDEN>
 <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
X-Mailer: WebService/1.1.22205
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol
Content-Length: 2458
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70408
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 70408 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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 <eliz@HIDDEN> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.

Message received at 70408 <at> debbugs.gnu.org:


Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 12:56:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 08:56:21 2024
Received: from localhost ([127.0.0.1]:43773 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwiMF-00028x-O9
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2024 08:56:21 -0400
Received: from fout2-smtp.messagingengine.com ([103.168.172.145]:60501)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rwiMD-00027e-Ge
 for 70408 <at> debbugs.gnu.org; Tue, 16 Apr 2024 08:56:18 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailfout.nyi.internal (Postfix) with ESMTP id 15BEB1380B2D;
 Tue, 16 Apr 2024 08:56:00 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Tue, 16 Apr 2024 08:56:00 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1713272160;
 x=1713358560; bh=avwixv5mbLJaN2or0JmwXiGbmq3FVdTMs74VwZU1RXI=; b=
 AOV5F5Aa3GnW+iOV4OfjOcyY18KHAriea05T0dVXwwYF84KxrYkOxQ0QREWNTSFa
 6EEc+utDCAkeHMRe6Ld/pv2y5SDazvRVz+IQDKSA251CCNmCW+/7gys6n5NkViaM
 K4j8Ns+UBqp4o3noi/q1dR6zz0cENSsXnvZx3p4guTwd8zEmFhEzKDlklzCyhfw1
 NUoq1v0duYxnXBixtONr9IzaF31cifltP3ClUI/2Eof7Y+w0XtylJN4YcBNKwiw9
 Dy1S5OiILu+ZkMF6KFXCFY+cgnMzleZHu4TQLUpy78GEgubNNhzxrthIHvO35zjR
 keaGBZJ8cMZYLBxXNY6WUg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1713272160; x=
 1713358560; bh=avwixv5mbLJaN2or0JmwXiGbmq3FVdTMs74VwZU1RXI=; b=L
 Wq8l+7VsMIK1amL/k4Bbv/jlZhYBaZ2pRonE5BRVSkoe/8omB2+db/LNlXpV+Hc6
 ExliMz0+3pz5fbWD6RFxaP7cxLPUZmYiLhU/7U3hqHRIaeYwlKKjgc47i/jHfT7P
 Qo+hCpNRSi1BDUdFOZGvpxeJ1SbbOipz534FOmXoPP8xlluSaycc6BZB8XXYsvOU
 FAVwlsJnOFIx9JExTqAsahtpbS2qb7a7/rNT8wPjyXWVrq09/ynXv0yX8T48LRqP
 Ccnl7KfpxttTuv1rgCoSFxEaxIdUfSv5BKOYQoFOrxDUJbleXIi4y8Vlht0hQgmN
 Mk4Hz7se0xUZ8nLqRvbkA==
X-ME-Sender: <xms:X3UeZlQrZWYwCzrwgQKipAvE1ejewop8wx5yVaIR7AwtfCxA5OmVHg>
 <xme:X3UeZuwGZ48dmh8F3So6w47tpgweS0dqbH9ESjYTkhXnoQIHvI-Jzc0kWINN8Eap_
 IH7pNDSrXgXIxvpwZ8>
X-ME-Received: <xmr:X3UeZq1SBqDRyKNst7Y17JCMsDIsE80IINAdC9g2U_vh2hJ2rl03DurZsavSuB2ncum0>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejhedgfeefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhephffgjefhgfekjeekleehueeftdffjeegudehteetuefgudekvedvudfggeeg
 teejnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpghhnuhdrohhrghenucevlhhush
 htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhu
 thhovhdruggvvh
X-ME-Proxy: <xmx:X3UeZtANWFPRN8iVo7TFyEGA-aBJYXYGsgAjHhZEf-T-IoXM13w3Uw>
 <xmx:X3UeZuiF6vBVnBXyEtQaSKyQI8HGBAu5CR-sGyDL09kn_13WrmvmGg>
 <xmx:X3UeZhoQ8GoF1-lARf-HpcGsyJb1eVHYnbatfpvSU2443klJB2JiuQ>
 <xmx:X3UeZpjIQw3eXXHVg3R9TwS2vg45A2Olv9UnaFE4KHMHjbEpW3qI4Q>
 <xmx:YHUeZmfSPIpqSYhfC6GzijIQVUCPdCt2JuTI5qsaSR5AKbTvLjY7mZql>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 16 Apr 2024 08:55:58 -0400 (EDT)
Message-ID: <8cfba95b-fedd-4b5f-9778-d656601006d1@HIDDEN>
Date: Tue, 16 Apr 2024 15:55:56 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#70408: 30.0.50; Eglot and Project integration
To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
References: <87o7aas3sk.fsf.ref@HIDDEN> <87o7aas3sk.fsf@HIDDEN>
 <86le5djzz2.fsf@HIDDEN>
 <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70408
Cc: Ergus <spacibba@HIDDEN>, 70408 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Joao,

On 16/04/2024 15:33, João Távora wrote:
> On Tue, Apr 16, 2024 at 12:42 PM Eli Zaretskii<eliz@HIDDEN>  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.
> 
> This discussion should be aware of these half-recent developments
> https://github.com/joaotavora/eglot/discussions/1337
> 
> 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.

IIUC Ergus's request is primarily about a situation where an 
"out-of-tree" build is used. Meaning, the directory for build artefacts 
is not a subdirectory of the project root, but -- apparently -- some 
sibling directory of it (e.g. "../build"). So it's somewhat atypical, 
although I suppose the solution from the link above might work with it too.

This bug is split off from an emacs-devel discussion, where I posted a 
draft solution of mine: 
https://lists.gnu.org/archive/html/emacs-devel/2024-04/msg00279.html

I'm curious for any feedback - like would that be good enough for this 
and related cases, or maybe if someone has an even simpler approach in mind.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.

Message received at 70408 <at> debbugs.gnu.org:


Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 12:34:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 08:34:05 2024
Received: from localhost ([127.0.0.1]:43627 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwi0j-0007ru-96
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2024 08:34:05 -0400
Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]:59660)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1rwi0f-0007qh-R0
 for 70408 <at> debbugs.gnu.org; Tue, 16 Apr 2024 08:34:03 -0400
Received: by mail-lj1-x232.google.com with SMTP id
 38308e7fff4ca-2d8863d8a6eso55108341fa.3
 for <70408 <at> debbugs.gnu.org>; Tue, 16 Apr 2024 05:33:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713270824; x=1713875624; darn=debbugs.gnu.org;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=gudiM/q46TLchHoj49iQmWc1WTpSYLdEg8Vj8q9NKg8=;
 b=lRc2csqWzyZ0sGwSM3oGEoSda8osMiR2L3lijr7+FHGGGuNKZ4fPHJsfJD6bVjbbXv
 26UyQui7lfWXHRKiZgk2gvOW7FeJ57Fk82N4/MSFppsrJZ/MS2HTZJuZ3iRsNCXpx/Ge
 l0ArTWpvc5SBXuOwaBmDh/d0tGMLcv9XihT+8i7goscHNU48808g9lJ7ddz7d9Iq5k6b
 JSTSIYFzfeVv8N1u/MLI52VPYjTIsytQeVEx/PQD4+Etbr1zj7K7r7l2yxWnrdVJIq+P
 PQryeg5T+98R9a8XRzIn1LdnmXEI2VsOd83aGb1lAH1AyiUNV6nGQ9NhGpYd9EXFbd+C
 zq9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713270824; x=1713875624;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=gudiM/q46TLchHoj49iQmWc1WTpSYLdEg8Vj8q9NKg8=;
 b=qZom9WoHvyy9gEd1BSO70DnIfvmwUKWIW3ufgJ0LUo9IzwJYVUNu4Xg0OM6VocLzwH
 LLgTQQoETW0z4Rt+oFG7xZL5g/jMoW0j9q6dCSfPFrRhN6mQJr8NjDF46sEe76ENKLpT
 kuNH8PTz9TKSmryk/zfHSe/ShS/fbG6qbzqW4C2Fpi7+AyCmWp98BnitacK5Csv+Ul2C
 4SBmJDj2doqXMgwlEFTMll+cY4Evt9N0vSJFkAU1LWxOuRLy10ceme1B4d+1/xWAsMqV
 X0pSIAT069X2BmPWYSzFRYYrWLuzRG8s9TV+X2XAXwLIckoYbbq8nBeDA7QgoAmdiLZr
 0XGQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCV910CLGVy9VHFuspS9qfMV4Dt3iD1bHY2UdnvCY/iJwo0ufagmno4tJcqML1lsbFlZy7Zk1bm8wgrfCae0R1iEastAolc=
X-Gm-Message-State: AOJu0YxSsAbTaCGXpG64Om2fwHU41HV1Djpf5+PKdH73pu6gq+WThuEq
 TXRTepC994G4EVaeeEsNxqnORAU986cOZ19qU0Q9UNKL+GmQEftwZw5OZeEw9FbEG6TcF2ppJkK
 iqcgnyhCDdTCSidxPWiQ2xYwgeo4=
X-Google-Smtp-Source: AGHT+IEn2gV79z8nxspxAdz6c/JGBy/Au+wp0XpUbj50Ly0txv+NAP9WZO1NcwXveiKf0nXjaPcQ4KjoMzviL5hhGsQ=
X-Received: by 2002:a2e:b005:0:b0:2d4:a8cf:e798 with SMTP id
 y5-20020a2eb005000000b002d4a8cfe798mr10559610ljk.14.1713270823306; Tue, 16
 Apr 2024 05:33:43 -0700 (PDT)
MIME-Version: 1.0
References: <87o7aas3sk.fsf.ref@HIDDEN> <87o7aas3sk.fsf@HIDDEN>
 <86le5djzz2.fsf@HIDDEN>
In-Reply-To: <86le5djzz2.fsf@HIDDEN>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Tue, 16 Apr 2024 13:33:31 +0100
Message-ID: <CALDnm52cp2Mn2YQtK+jh+Pgq0BJMK4BRf1oiDF+8cGuxsUfPvg@HIDDEN>
Subject: Re: bug#70408: 30.0.50; Eglot and Project integration
To: Eli Zaretskii <eliz@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70408
Cc: Ergus <spacibba@HIDDEN>, 70408 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Apr 16, 2024 at 12:42=E2=80=AFPM Eli Zaretskii <eliz@HIDDEN> wrote=
:

> I think this discussion should include Jo=C3=A3o, so I added him.

Alright.

More importantly, I think this discussion should include Dmitry, as this se=
ems
to me a project.el extension.

This discussion should be aware of these half-recent developments
https://github.com/joaotavora/eglot/discussions/1337

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).

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.

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=C3=A3o




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.

Message received at 70408 <at> debbugs.gnu.org:


Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 11:42:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 07:42:57 2024
Received: from localhost ([127.0.0.1]:43398 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwhDE-0001eE-EM
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2024 07:42:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33552)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rwhDA-0001cq-M3
 for 70408 <at> debbugs.gnu.org; Tue, 16 Apr 2024 07:42:54 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rwhCp-00012j-E0; Tue, 16 Apr 2024 07:42:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=EARFpVae10rhXSEuAH4mzg+lO2Vcp9EzJwlH6ItNpZ0=; b=YDpXTFgYnW5n0LuTg5uJ
 A9KijmLGHeJ1SmuYlbzYZ3HXoZo9h65iqdizjUsHxLlOihaQ4/pbzrJhgJoXzVUn50OYFdM4x+GE9
 s6bmBp4eihYabwxSKo3Ab+x7uiPHGy7oAjIyfPbriip6X07ybA+nu7cqR+Ca3rHmNt0XC3SIr2l1i
 XFq8Y+WIG56LvjYe1CDPe9L2bbTuAeDRnFbezI2Vy1J/ArUOTbH6JWfcmNrlXvVvgXuLsFuvrm8Ei
 8YOIz7aSMC9dyTJx+jFuYsQc02ziYbgGtFWRBnc/HKNwk7TnSCsagGKYVykuOwO1swukl9WXITDQF
 QjiAXyIy4VrRWQ==;
Date: Tue, 16 Apr 2024 14:42:25 +0300
Message-Id: <86le5djzz2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ergus <spacibba@HIDDEN>, =?iso-8859-1?Q?Jo=E3o_T=E1vora?=
 <joaotavora@HIDDEN>
In-Reply-To: <87o7aas3sk.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#70408: 30.0.50; Eglot and Project integration
References: <87o7aas3sk.fsf.ref@HIDDEN> <87o7aas3sk.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70408
Cc: 70408 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 15 Apr 2024 23:40:27 +0200
> From:  Ergus via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> Recently we have been discussing the possibility to improve project.el
> in order to recognize/interact a bit more smartly with common modern
> build infrastructures (i.e meson and cmake).
> 
> These build systems generally are also capable to generate the
> compile_commands.json for clangd in the build directory independently of
> its location (generally out of sources).
> 
> The current extension for project.el is capable to recognize the build
> directory to execute project-compile. The approach works well in the
> tests and I added a small POC code to modify the
> `glot-workspace-configuration' variable on the fly.
> 
> This integration of project.el is pretty useful and simplifies the
> configurations required to make eglot work a bit more consistently by
> detecting the database more accurately.
> 
> The only limitation I am facing at the moment with this is that
> project.el initializes lazily (when a project-something command is
> called) and generally eglot seems to be designed to autostart as a mode
> hook.
> 
> So the issue has two parts:
> 
> 1. Is it desirable or are the eglot developers somehow interested in the
> integration with project.el? If so, what are the key features of
> interest.
> 
> 2. Do you have some suggestion about how to initialize the eglot server
> to properly update the `glot-workspace-configuration' on the fly?
> 
> My very primitive proof of concept code:
> 
> https://github.com/Ergus/project-multi-mode/blob/822316d82007e1b68c9a8dfcfbe205cb63b4f545/project-multi-mode.el#L194

Thanks.

I think this discussion should include João, so I added him.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Apr 2024 21:41:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 15 17:41:13 2024
Received: from localhost ([127.0.0.1]:39729 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwU4e-0001di-Sn
	for submit <at> debbugs.gnu.org; Mon, 15 Apr 2024 17:41:13 -0400
Received: from lists.gnu.org ([2001:470:142::17]:59490)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1rwU4Z-0001bl-9r
 for submit <at> debbugs.gnu.org; Mon, 15 Apr 2024 17:41:11 -0400
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 <spacibba@HIDDEN>) id 1rwU4H-000824-Kc
 for bug-gnu-emacs@HIDDEN; Mon, 15 Apr 2024 17:40:49 -0400
Received: from sonic316-12.consmr.mail.bf2.yahoo.com ([74.6.130.122])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <spacibba@HIDDEN>) id 1rwU4E-0005tL-IV
 for bug-gnu-emacs@HIDDEN; Mon, 15 Apr 2024 17:40:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1713217242; bh=og27aeYtuqhsIl9/Wb5WvR55cfzeddu5epK8lZtboBo=;
 h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To;
 b=BuMOzJm0ez/CFEx2s/MBQWYog9/XJsLfB2M2RWkB2jyV3D9Vj8VDolVESGIU8hKf1RBkaKPdaKmYGrsmRh/we9xeBcRrBhBUPINh7DZX0alEkm/tEsxVpGG0beeWqVG1YfOQ/rfU0XhAzDcLGzAgs6J1LkTnensB+cJZp2lF8WMNSmY6dfSqnGVLsLlMBTmrU1uxLUTPq62MLLGS6Suqx5ZRSt8Rjl0zipMCfDJJv+SoNeggleLlPN6LvSHt14g10hnaxAP4GTwUOh+7TwnNAxUNZSGXVhm5IdEi1rk4bwhetQ3zVaIB1QfnMFORq2KbFtji+qKYoz3qEOFqMppAMw==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1713217242; bh=i1zaOxp4lOBuMncjQZY7rtviJmVfzErEL6kq9ZYLK8V=;
 h=X-Sonic-MF:From:To:Subject:Date:From:Subject;
 b=HdJ7aOLUQxKwGq2PzNkuRv7tDeQmtHXjZeIk17P4BdY8UswL9tykMXc+Wf2fxA+IeWseLEzveKXCq5O11R/49nMceZj+cWU3av3hGM2RnR+zv1kDTmQYO7RGf1fLbGCDq3rh2Xg200eUDwFbpMXYQsCpPcU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qj4TcaA0QjnzmiE8hXQJ8_P2vmlvU97U7CxiqreXGVqx2guR.qty.bzsMyHUzaAcMWjmXzh2z5
 x6md.0j9UUPg15ivp_4gX6qs7B8wtKTRH9CrozD2TW.0Hp2w2p34e95j.D1tlj35HQF1WotMYfvB
 g_gg.Ldy.BDnLd7xfyqaNS4WoQhDxd6zMv0HzneR302FAuGMyX8cxlWumez9vJxwudVaFbqJiqWK
 x6Wuok3XrOYqBDDEZWSVrnB5eaL23o8cpJd0KBHmDIxuXNoQC6XcvXrETHfPxidxUEHdHtuF5bTE
 66Z6CI9_yp3MQNRu49zf19LxSQ3HB9CLAbwJf_NXLbCp_4yWIL6ZRaTCZQ3Ahl5JB5Fs1KqtGFAq
 hd3xPYCIltkEIY69lfQ--
X-Sonic-MF: <spacibba@HIDDEN>
X-Sonic-ID: 103a26d8-1cd6-458f-bf01-47f7f72f58a0
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic316.consmr.mail.bf2.yahoo.com with HTTP; Mon, 15 Apr 2024 21:40:42 +0000
Received: by hermes--production-ir2-7b99fc9bb6-b6zps (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID 3748d864e8e807aa0ed622ef5f8333b1; 
 Mon, 15 Apr 2024 21:40:40 +0000 (UTC)
From: Ergus <spacibba@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; Eglot and Project integration
X-Debbugs-Cc: 
Date: Mon, 15 Apr 2024 23:40:27 +0200
Message-ID: <87o7aas3sk.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
References: <87o7aas3sk.fsf.ref@HIDDEN>
X-Mailer: WebService/1.1.22205
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol
Content-Length: 1488
Received-SPF: pass client-ip=74.6.130.122; envelope-from=spacibba@HIDDEN;
 helo=sonic316-12.consmr.mail.bf2.yahoo.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)




Hi:

Recently we have been discussing the possibility to improve project.el
in order to recognize/interact a bit more smartly with common modern
build infrastructures (i.e meson and cmake).

These build systems generally are also capable to generate the
compile_commands.json for clangd in the build directory independently of
its location (generally out of sources).

The current extension for project.el is capable to recognize the build
directory to execute project-compile. The approach works well in the
tests and I added a small POC code to modify the
`glot-workspace-configuration' variable on the fly.

This integration of project.el is pretty useful and simplifies the
configurations required to make eglot work a bit more consistently by
detecting the database more accurately.

The only limitation I am facing at the moment with this is that
project.el initializes lazily (when a project-something command is
called) and generally eglot seems to be designed to autostart as a mode
hook.

So the issue has two parts:

1. Is it desirable or are the eglot developers somehow interested in the
integration with project.el? If so, what are the key features of
interest.

2. Do you have some suggestion about how to initialize the eglot server
to properly update the `glot-workspace-configuration' on the fly?

My very primitive proof of concept code:

https://github.com/Ergus/project-multi-mode/blob/822316d82007e1b68c9a8dfcfbe205cb63b4f545/project-multi-mode.el#L194

Best,







Acknowledgement sent to Ergus <spacibba@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70408; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 20 Apr 2024 11:30:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.