emacs-devel
[Top][All Lists]
Advanced

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

Re: xref-find-matches and stuff


From: Eli Zaretskii
Subject: Re: xref-find-matches and stuff
Date: Sat, 09 May 2015 17:03:23 +0300

> From: Vitalie Spinu <address@hidden>
> Cc: address@hidden,  address@hidden,  address@hidden
> Date: Sat, 09 May 2015 15:46:00 +0200
> 
>  >>> 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.

I don't see why bother.

>  >> 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.

I received the picture, but all it shows is a few intersecting
rectangles with labels.  It doesn't explain what is A or B.

> 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.

The notion of "context" is still not clear, sorry.

Also, I don't understand why would TAGS not know about A.  It doesn't
miss definitions, IME.

>  > 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
> simultaneously.

No, I need only one in each particular use case.

>  > 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?

Not every open file or buffer needs this facility.  In a buffer you
can simply search.

>  > 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.

Of course it's manageable!

>  >> 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 ...

Scale and rules are worthless when I need to know the time.



reply via email to

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