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: Vitalie Spinu
Subject: Re: xref-find-matches and stuff
Date: Sat, 09 May 2015 20:23:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

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

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

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.

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

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.

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



reply via email to

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