From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65520: 30.0.50; [FR Xref] Project-wide operations Date: Fri, 25 Aug 2023 09:48:15 +0200 Message-ID: References: Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17645"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65520@debbugs.gnu.org, Visuwesh , Dmitry Gutov To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 25 09:49:24 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 1qZRZM-0004NF-RY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Aug 2023 09:49:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZRZ2-0007FE-VU; Fri, 25 Aug 2023 03:49:08 -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 1qZRYw-0007Eq-9z for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 03:48: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 1qZRYw-0000JL-1p for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 03:48:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qZRZ0-0005hp-Dl for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 03:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2023 07:49:02 +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.169294970621807 (code B ref 65520); Fri, 25 Aug 2023 07:49:02 +0000 Original-Received: (at 65520) by debbugs.gnu.org; 25 Aug 2023 07:48:26 +0000 Original-Received: from localhost ([127.0.0.1]:39151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZRYP-0005fc-MJ for submit@debbugs.gnu.org; Fri, 25 Aug 2023 03:48:26 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16]:40554 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZRYN-0005fI-Nx for 65520@debbugs.gnu.org; Fri, 25 Aug 2023 03:48:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1692949698; bh=EFZQ+jVJ7V/Y7UYUDzoW0KbxHNdE1ZRR3Isf4JLuUMw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RRbC1Mn0OzMdd++IgmjXreUJpgJxqqmut8dheGaOLn1/sK9Dnh5FTWW1XigaQHG9S dgoadDV2GCN4xJ6ahoYiG7sPSbWdeDL+PKet9lK+NkwpYtpGQzT1QV/jV5IuHKudL7 zIgEOFHKQgZmkkvNWUDZg6fC9IzvoJumOrRjiE7vVQS4dYvHA09OflFyKPii20GrTC PjHDU8eY4rANf3mAWgkx2qG/0rjBcu+Uv9jZvnWzyNu1vDoDfpf4TWwDjU+UpXIntj fmF8eU71bFPDw/VEvW8V0ru67ZRcdWDy0vVfnsMuijq9FaCiBQSmdRjjR4G3Xr/53L b2qhpNU+AW93g== In-Reply-To: ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Fri, 25 Aug 2023 09:03:39 +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:268408 Archived-At: Gerd M=C3=B6llmann writes: >>> 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. Note that specifically for Elisp functions, you can use `find-function` from anywhere (including your C buffers). >> 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. > 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. That sounds really interesting! The way I'd suggest structuring it is introducing a new command `project-find-definitions` that prompts for an identifier defined in the current project and jumps to it, similarly to `xref-find-definitions` but limited to the current project and not limited to the current `xref` backend. The way `project-find-definitions` finds this definitions would be up to the `project` backend. Crucially, ISTM that it would be better to build this as an extension of `project`, not `xref`. Of course, the "naive approach" based on `xref` described above would be a perfectly good starting point for any `project` backend and may be used as a default. Best, Eshl