[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xref-find-matches and stuff

From: Vitalie Spinu
Subject: Re: xref-find-matches and stuff
Date: Sat, 09 May 2015 15:46:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

 >>> Eli Zaretskii on Sat, 09 May 2015 16:19:36 +0300 wrote:
 >> Then, indeed, you won't need Imenu, nor REPL backends. Till such an
 >> universal tool is there, xref itself comes very close to it if imenu,
 >> tags and REPL backends were automatically merged.

 > If by "merged" you mean a union of all the symbols returned by all
 > the back-ends, then you have just described a single back-end that
 > will satisfy our needs.

That's exactly my point. Thank you!

Full union is a bit too much, you can easily do better than that.

 >> You and other people seem to assume that given the context of A you
 >> can infer which backend to use in order to jump to B. Unless you you
 >> have an unique symbol at point in A matching B, that's impossible.

 > I'm sorry, but you didn't say what are A and B here, and what is the
 > context of A.

That was in the picture. I hope you received it.

The exact context at point of A is irrelevant (it can be C++ or R) the
only thing relevant is that to A you can jump only with Imenu backend to
B only with TAGS backend.

 >> If I am in an C++ tutorial which is not tagged (but has Imenu). Assume
 >> no symbol at point. How can xref know if I want to jump to a symbol in
 >> this example file (imenu backend) or a C++ file in my current project
 >> (tags backend)?

 > Who or what _can_ know that, except the user herself?  

Exactly my point!

 > And the user then has to set up this session so that the _single_
 > relevant back-end is to be used.

??? In my example backends are non-overlapping. You need all of them

 > And anyway, are the majority of the projects we work on tutorials?  I
 > sincerely doubt that.

Common. That's just an example. Don't you create scratch buffers to try
stuff? Don't you open other projects/languages to see how stuff is
implemented when developing your primary stuff?

 > The difficulty of making the decision which back-end to use does not
 > imply that we should avoid making the decision.  

You can leave the decision to the users but that doesn't mean it will
get any easier. Either you can try to solve it for all, or hundreds of
thousands will be solving for themselves.

 > It just implies we need better methods of making that decision.

You seem to be still convinced that disambiguation the backend from the
current context is a manageable task.

 >> I have C-. for elisp-xref, M-. for whatever is the default, M-o for
 >> imenu-anywhere and I am seriously thinking about the forth key for etags
 >> because inconsistency with M-. started jarring on me.

 > There's a saying that a person with one watch always knows the time,
 > even if her idea of the time is a bit biased; whereas a person with
 > more than one watch always confused wrt what time it is.

I think of it more like watch + scale + ruler ...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]