[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xref-query-replace
From: |
Dmitry Gutov |
Subject: |
Re: xref-query-replace |
Date: |
Sun, 10 Jan 2016 06:54:34 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Thunderbird/43.0 |
On 01/10/2016 06:32 AM, Eli Zaretskii wrote:
I don't understand the importance of the length, but the definition of
Knowing the length lets us determine the boundaries of the match inside
the file. This information is gathered at the time the xref instance in
constructed.
a method points to a specific source line, exactly like a reference.
So whatever you gather from a reference could be done with a
definition, no?
What will I do with the source line, then? Suppose TAGS file contains an
entry for the method "foo" pointing to the line
def self.foo
And the backend returns it as one of the results for the definition of
"foo". How will we determine the bounds of the match? (search-forward
"foo")? What if the line looks line this?
def self.foo(bar); @foo = bar; self.another_foo(@foo); end
We'll get false positives this way.
In another situation, the identifier-to-search can be more complex: say,
"Bar.foo". Then, even `search-forward' won't help.
To put it differently, neither etags, nor find-func.el provide the
necessary information to create xrefs with match boundary information.
If we define a collective term for such xref functions, we could mention
it in their docstrings.
I just don't see what kind of collective name would be possble.
Well, I wouldn't ask if I managed to come up with one. I don't see
another way to resolve the issue, however.
- Re: xref-query-replace, (continued)
- Re: xref-query-replace, Dmitry Gutov, 2016/01/09
- Re: xref-query-replace, Eli Zaretskii, 2016/01/09
- Re: xref-query-replace, Dmitry Gutov, 2016/01/09
- Re: xref-query-replace, Eli Zaretskii, 2016/01/09
- Re: xref-query-replace, Dmitry Gutov, 2016/01/09
- Re: xref-query-replace, Eli Zaretskii, 2016/01/09
- Re: xref-query-replace, Dmitry Gutov, 2016/01/09
- Re: xref-query-replace, Eli Zaretskii, 2016/01/09
- Re: xref-query-replace, Dmitry Gutov, 2016/01/09
- Re: xref-query-replace, Eli Zaretskii, 2016/01/09
- Re: xref-query-replace,
Dmitry Gutov <=
- Re: xref-query-replace, Eli Zaretskii, 2016/01/10
- Re: xref-query-replace, Dmitry Gutov, 2016/01/10
- Re: xref-query-replace, John Wiegley, 2016/01/18
- Re: xref-query-replace, Dmitry Gutov, 2016/01/18
- Re: xref-query-replace, John Wiegley, 2016/01/18
- Re: xref-query-replace, Dmitry Gutov, 2016/01/18