From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#64608: 29.0.90; Eglot: reuse server when visiting external files Date: Fri, 14 Jul 2023 15:00:34 +0100 Message-ID: References: <837cr24w1y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001cf140060072e0d8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40886"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64608@debbugs.gnu.org, Filippo Argiolas To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 14 16:01:22 2023 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 1qKJMI-000AQR-8o for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Jul 2023 16:01:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKJLz-0004JQ-Tg; Fri, 14 Jul 2023 10:01: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 1qKJLy-0004Ix-H6 for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 10:01:02 -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 1qKJLy-0000tn-83 for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 10:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKJLy-0002G5-2s for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 10:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jul 2023 14:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64608 X-GNU-PR-Package: emacs Original-Received: via spool by 64608-submit@debbugs.gnu.org id=B64608.16893432558657 (code B ref 64608); Fri, 14 Jul 2023 14:01:02 +0000 Original-Received: (at 64608) by debbugs.gnu.org; 14 Jul 2023 14:00:55 +0000 Original-Received: from localhost ([127.0.0.1]:43101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKJLq-0002FY-PQ for submit@debbugs.gnu.org; Fri, 14 Jul 2023 10:00:55 -0400 Original-Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]:59715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKJLo-0002FD-Gy for 64608@debbugs.gnu.org; Fri, 14 Jul 2023 10:00:53 -0400 Original-Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3a3efee1d44so1472097b6e.3 for <64608@debbugs.gnu.org>; Fri, 14 Jul 2023 07:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689343247; x=1691935247; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LNWXf2Uv0YDKk8hkbbCuz3wraHlfZx147DoaO1kTTLU=; b=CaTWCk0AvUU4FUVUytgJ4vOsUgT7n189E69txnc7KFdvXDB2TfEtv8SjJbIN/N2eWq b+xtzpth/XPhVhowFIJH9/Nsb5ela1VCctMZTy6hfOiReyMpBFTuw7iN4GkpG2B6k7tv ARkAiKzEJmFi4aVBfk64HNPMR3mgRzYROkNoeUqyzponFK1o4Y4FmwLdLsV+y79ORU1D MxcRTzapiD05PdJ93ALhXXrckN/ysdihfI8iCddIifXlMufv3uVAIrBsCwZZQNzBkEPE ck3W8r0AvUNlOMfwpeZSZZct2/J9qX2y8Nv76ofN0E9pL6mMYWUamkyo+ezVjIKzTLgz Oucg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689343247; x=1691935247; 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=LNWXf2Uv0YDKk8hkbbCuz3wraHlfZx147DoaO1kTTLU=; b=YiJv6k8alwYzGP3wWIL1d5aERdoNhdri9kwyN4/CNpeJMPEjiEcDqXe3nAprBbNYc7 kf53jaYCfopLtZoX67NH7/hFWut9vhajyUIcpp2Sz/L+1mHaRi5hgZ2iHd8E6uhMZQ+s DZWeAS6qV5aChDd6GlDD4SZxWHpHbXw/vx7u6/zZC4llZLXRzuXXZj7JJlSubSnkPwyN SCF50pyX/JL6glyzb6QPgAzc6zmOmLT+CJtdkAMZn8ev9iJZahivUzR753is4njgcGy8 fuHmLjB7dkOF1TI5FdseAS6x7Bz6ogaDmZ+1rRIMkFvhIM3Urv3bWWvIk7RgCYTsBVdq o7uw== X-Gm-Message-State: ABy/qLZANykE3i8bSrsBDEQ09aDwsbsZMVPBYWJ2rfyTru0K3zm4cjkL ueMFmZxCIOJe2aVAFcPxNvw8HbZ9w3DOrWibcvg= X-Google-Smtp-Source: APBJJlGsPb8IeTq3OqYI/WkpDh//jHg5d/oXlVvdPwzdB8YcF0KbTAXAidA5vtnA3rCy3SGYzlSBqklhz1ZKMPNeJAs= X-Received: by 2002:aca:de06:0:b0:3a3:7db3:81a6 with SMTP id v6-20020acade06000000b003a37db381a6mr4507402oig.35.1689343246508; Fri, 14 Jul 2023 07:00:46 -0700 (PDT) In-Reply-To: <837cr24w1y.fsf@gnu.org> 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:265093 Archived-At: --0000000000001cf140060072e0d8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jul 14, 2023, 11:38 Eli Zaretskii wrote: > > > > Any pointer to achieve something like this with current project.el and > > eglot code would also be great. Maybe with a custom project backend? > > Sorry, I don't understand: AFAIU Eglot reuses the same server for all > the buffers under the same major-mode, so you should already have what > you want? Or what am I missing? > Not really like that Eli. Within the set of all the buffers in the major mode, subsets are defined for every project, i.e. return value of project-current. Broadly, that pair {major-mode , project} is the discriminator that determines Eglot's choice of server instance to manage a given buffer. The exception is buffers visited by eglot-extend-to-xref. I believe this is explained in the manual. If it's not clear, we should improve it. Fillipo, to fully understand your use case and what's missing I need you to create a structural example of those related projects, closely representative of the real one, pack it as a zip or a reference to a Git repository, in a way that I can experience the same limitation you are experiencing myself. Is the server you are using Clangd? If so, say the version. In summary, please follow the seven steps outlined in https://joaotavora.github.io/eglot/#Troubleshooting-Eglot, else it's going to be hard to help you. Jo=C3=A3o --0000000000001cf140060072e0d8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Jul 14, 2023, 11:38 Eli Zaretskii <eliz@gnu.org> w= rote:
>=C2=A0
> Any pointer to achieve something like this with current project.el and=
> eglot code would also be great. Maybe with a custom project backend?
Sorry, I don't understand: AFAIU Eglot reuses the same server for all the buffers under the same major-mode, so you should already have what
you want?=C2=A0 Or what am I missing?

Not really like that Eli. Within the = set of all the buffers in the major mode, subsets are defined for every pro= ject, i.e. return value of project-current. Broadly, that pair {major-mode = , project} is the discriminator that determines Eglot's choice of serve= r instance to manage a given buffer. The exception is buffers visited by eg= lot-extend-to-xref. I believe this is explained in the manual. If it's = not clear, we should improve it.

Fillipo, to fully understand your use case and what's missing= I need you to create a structural example of those related projects, close= ly representative of the real one, pack it as a zip or a reference to a Git= repository, in a way that I can experience the same limitation you are exp= eriencing myself. Is the server you are using Clangd? If so, say the versio= n.

In summary, please fo= llow the seven steps outlined in https://jo= aotavora.github.io/eglot/#Troubleshooting-Eglot, else it's going to= be hard to help you.

Jo= =C3=A3o
--0000000000001cf140060072e0d8--