all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>, 65520@debbugs.gnu.org
Cc: Visuwesh <visuweshm@gmail.com>
Subject: bug#65520: 30.0.50; [FR Xref] Project-wide operations
Date: Fri, 25 Aug 2023 19:20:03 +0300	[thread overview]
Message-ID: <5fc3aec1-019e-49c8-d939-91042f16650b@gutov.dev> (raw)
In-Reply-To: <m2msyfr4c4.fsf@Mini.fritz.box>

On 25/08/2023 10:03, Gerd Möllmann wrote:
> Dmitry Gutov <dmitry@gutov.dev> 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).





  parent reply	other threads:[~2023-08-25 16:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25  6:49 bug#65520: 30.0.50; [FR Xref] Project-wide operations Gerd Möllmann
2023-08-25  7:03 ` Gerd Möllmann
2023-08-25  7:48   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-25 16:26     ` Dmitry Gutov
2023-08-25  8:26   ` Gerd Möllmann
2023-08-25 16:17   ` Dmitry Gutov
2023-08-26  5:22     ` Gerd Möllmann
2023-08-25 16:20   ` Dmitry Gutov [this message]
2023-08-26  5:31     ` Gerd Möllmann
2023-08-27  0:32       ` Dmitry Gutov
2023-08-27  6:32         ` Gerd Möllmann
2023-08-25  7:21 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5fc3aec1-019e-49c8-d939-91042f16650b@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=65520@debbugs.gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=visuweshm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.