From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64608: 29.0.90; Eglot: reuse server when visiting external files Date: Fri, 14 Jul 2023 13:38:49 +0300 Message-ID: <837cr24w1y.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16928"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64608@debbugs.gnu.org To: Filippo Argiolas , =?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 Fri Jul 14 12:39:18 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 1qKGCk-0004E3-7F for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Jul 2023 12:39:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKGCW-0001ra-1B; Fri, 14 Jul 2023 06:39:04 -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 1qKGCU-0001rC-PH for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 06:39: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 1qKGCU-0007wZ-Hj for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 06:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKGCT-0001Dl-TH for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 06:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jul 2023 10:39:01 +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.16893311234668 (code B ref 64608); Fri, 14 Jul 2023 10:39:01 +0000 Original-Received: (at 64608) by debbugs.gnu.org; 14 Jul 2023 10:38:43 +0000 Original-Received: from localhost ([127.0.0.1]:41512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKGCB-0001DE-1Y for submit@debbugs.gnu.org; Fri, 14 Jul 2023 06:38:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKGC5-0001Cx-QZ for 64608@debbugs.gnu.org; Fri, 14 Jul 2023 06:38:41 -0400 Original-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 ) id 1qKGBz-0007pI-Q2; Fri, 14 Jul 2023 06:38:32 -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=JJUQ4tpqi5BE0phqpQJG2/udb+y5J8kUQJACZBXePOI=; b=J9+2YgF3M6LSRsPVxJRV UodPQUOSVLnmDK3/bWZzzSUr1AfhFAXV1BN+8NQ2CjWj803q0sO6JxYEgUdZptq9vno9Ke+r2nk/a SBs8whhCjO54MU+ox1VT08zIW9zvmP4I5g79Nc9c5axTslckH99AhoRnV8CSc1yKo9UZP8Bn58Drc 9ObCcjh7h+rKRUUKJse5lvH86YruMV+dytLCWrRn4z28kkIGM/4BEmPS7y+2ERi11sDNiJYfgZLSE RGXN4PmLHMQpOJd8OHt7Pxfanbjzn44dg2wpr5hvvuE9+EsbS/MWwQmio0yBSMuDn1aaJA8SkV6bz nuefJhbukz0Reg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKGBz-0003Ec-AD; Fri, 14 Jul 2023 06:38:31 -0400 In-Reply-To: (message from Filippo Argiolas on Fri, 14 Jul 2023 07:51:28 +0200) 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:265076 Archived-At: > From: Filippo Argiolas > Date: Fri, 14 Jul 2023 07:51:28 +0200 > > Hi, > > I'm working on a couple of projects each with their main root and all > sharing some common code in an external root dir. > > Each project has a compile_commands.json that knows how to compile the > external shared code. External root has no compile db and doesn't know > how to compile itself. > > Eglot currently allows me to jump to external files using xref while > keeping the current active running server by setting > eglot-extend-to-xref. > > Project.el allows me to visit external files using project-or-external- > functions by defining project-external-roots on my custom backend or > project-vc-external-roots-functions with the default backend. > > It would be great if I configure Eglot to not switch to a new server > when visiting an external file in a similar way it does with xref. > > 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? Adding João to this discussion.