From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#65520: 30.0.50; [FR Xref] Project-wide operations Date: Fri, 25 Aug 2023 19:20:03 +0300 Message-ID: <5fc3aec1-019e-49c8-d939-91042f16650b@gutov.dev> References: 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="1576"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Visuwesh To: Gerd =?UTF-8?Q?M=C3=B6llmann?= , 65520@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 25 18:21:21 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 1qZZYm-000AdS-8i for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Aug 2023 18:21:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZZYT-0001xq-CY; Fri, 25 Aug 2023 12:21:01 -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 1qZZYP-0001xe-G9 for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 12:20:58 -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 1qZZYP-0000YC-7x for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 12:20:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qZZYT-00009s-SC for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 12:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2023 16:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65520 X-GNU-PR-Package: emacs Original-Received: via spool by 65520-submit@debbugs.gnu.org id=B65520.1692980422543 (code B ref 65520); Fri, 25 Aug 2023 16:21:01 +0000 Original-Received: (at 65520) by debbugs.gnu.org; 25 Aug 2023 16:20:22 +0000 Original-Received: from localhost ([127.0.0.1]:41109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZZXm-00008c-KU for submit@debbugs.gnu.org; Fri, 25 Aug 2023 12:20:22 -0400 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:40375) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZZXk-00008L-Gd for 65520@debbugs.gnu.org; Fri, 25 Aug 2023 12:20:17 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 0A2823200AB3; Fri, 25 Aug 2023 12:20:05 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 25 Aug 2023 12:20:06 -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:sender:subject:subject:to:to; s=fm3; t= 1692980405; x=1693066805; bh=jB3Rg5SEYL2S5IMT5HblYKI3dsa0ZrrpUT9 WN/qS380=; b=N5rHbI2WKjkvrYua+GywjcAmBEXwFBkzJSEVUCDxWf0OQsI4X6b LJaRvAhZI3NF+WDKzU/kwd5Fe8LkEs7Tn+Bk8RCytCjY99w7irR/fKCyBXW7rMLz C94wDrvABqIwU25cU0C6we+7JjXjmaWBs8zbQqWgEDCwGXo+awZ0NbZdX/537tSF WCLy2zcbXiKqvO/DhiLaxzCyJelbZfqmTgAknCRfnsi+QX5DOJBLn4RILgdvW6jI IJU1i6x2gDv9bIHqcrdDbjWVZar1LRDVg9mdOsSFdakmmluJwexloOF71PwIthES ga7T+KKipwoSi9YGGJN5m9OTijSua7jxOdg== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1692980405; x=1693066805; bh=jB3Rg5SEYL2S5IMT5HblYKI3dsa0ZrrpUT9 WN/qS380=; b=DNb2C4zHqarU9Jr096La7icQV/SdECBaZw27tksPAJ1exd5Gz9N NFY1JOUEbVIz7RjaDf19Yh470Lha2XeDGClG6WmJbPQYNMGPNkdjSmoNK6qlMYrF wXd1nAwo2O5MODjljs33/mxcjJjoOYY3h7QPyKpbQfMzNp1GffiyBxDxCXmi+3cU AmB0bWBUyzghTjnsKat7x/2S5aawuaogn3CKNNtsI9QZjrD9NY8Hl61hotSh4xb7 Qf0yeQeRnnl7kHxOILXTioV4WXcOy8dixUSDKzM4dVD5hhl+/A9QthL2ZNNBo1UZ yuDqgdp9tW2dUcPjZ19PN9sfJs++MlpzEOQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddvkedgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesth ekredttdefjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehg uhhtohhvrdguvghvqeenucggtffrrghtthgvrhhnpefhffehleejffegffeugefhkeektd ffgfehjedvgeejtedtudehueffgffgfeejheenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Aug 2023 12:20:04 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:268442 Archived-At: On 25/08/2023 10:03, Gerd Möllmann wrote: > Dmitry Gutov writes: > >>> In C mode, Xref works using Eglot, in ELisp mode it uses something >>> else >>> (I have no tags tables). Both work really well, but I apparently have >>> to be in an ELisp buffer to use one and in a C buffer to use the other. >>> Feature request: Is it possible to use more than one backend at the >>> same >>> time? So that I could C-M-. to find an ELisp function while being in a >>> C file? I couldn't find something like that mentioned in the docs, so I >>> guess it's not yet possible. >> >> No such capability at the moment, but we indeed have an ELPA package >> xref-union which implements the "merging" feature that has been >> requested in the past. > > Thanks also to Visuwesh for pointing me to xref-union. Have you tried it? By setting up both it and the xref-backend-functions manually (in a hook) in every relevant buffer you might get more or less the requested behavior. If not, what does feel unsatisfying still? >> A naive approach, or for the new code to search across different open >> buffers and look for different available xref-backend-functions >> elements. And then prompt the user, and then call (?) the said >> function in one of the buffers it was found in, because in all >> likelihood it would fail in unrelated ones. >> >> Perhaps the solution is to add a new facility to Xref, where different >> "projects" would be able to register globally in. A feature request >> indeed. > > I'm not sure about the "different project in the same session" thing. > > My mental model is like so: I'm in a Git repo (Emacs), which is, I think > also a project in the project.el sense. This project contains differnt > sets of files for which information is available using different > backends (Eglot, Etags, others depending on the kind of project). What > U'd like to have is something on the level of such a project, if you > know what mean. That is, M-. would take all available info for such a > project into account. Indeed, it's also a question of mental model, which we might have different. When I was saying "different projects" and "register globally", I was thinking of being able to jump to Emacs' sources and hack them from anywhere: from any other project I might be working on at the moment. If we're talking about Emacs development only, a "combined" backend might make more sense (see the other email).