[Top][All Lists]

[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 21:49:07 +0300

> From: Vitalie Spinu <address@hidden>
> Cc: address@hidden,  address@hidden,  address@hidden
> Date: Sat, 09 May 2015 20:23:49 +0200
>  >>> Eli Zaretskii on Sat, 09 May 2015 17:03:23 +0300 wrote:
>  > rectangles with labels.  It doesn't explain what is A or B.
> If rectangle is a file, then A and B are physical positions in that
> file.

Files don't intersect; your rectangles did.  So I still don't
understand what that picture was supposed to illustrate.

>  >> 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.
> Anything what you can infer from around your current location is
> context. Symbol at point is context, current major mode is context,
> whether the buffer is visiting a file is context.

OK, but how's that relevant to the issue at hand?

> The xref initiative is essentially to make a supernatural M-. that would
> be able to infer where to go (B) from the context around current point
> (A). People seem to think that xref can achieve that by choosing the
> backend first and then rely on that backend to give you B. But choosing
> the backend based on the context is a meaningless task.

Who said a back-end is selected solely based on context?

>  > Also, I don't understand why would TAGS not know about A.  It doesn't
>  > miss definitions, IME.
> REPLs knows about dynamically created objects about which TAGS have no
> idea.

Why would I need to "jump" to such an object?  I've just created it,
so it's right here, where I did that.

xref is for objects you don't see, because you don't know where to

> Go to *scratch* buffer and write (defvar foo 34). Imenu now knows about
> 'foo', TAGS don't. Each time you open an untagged file (related project,
> example etc), imenu will know about symbols in it, TAGS won't.

I already know about foo, so I need no help in finding it.

>  >> > 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.
> If all you have is a watch, you cannot measure your weight.

I don't need to, I just need to know the time.

reply via email to

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