[Top][All Lists]

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

Re: xref-query-replace

From: Eli Zaretskii
Subject: Re: xref-query-replace
Date: Sat, 09 Jan 2016 19:08:02 +0200

> Cc: address@hidden
> From: Dmitry Gutov <address@hidden>
> Date: Sat, 9 Jan 2016 19:48:17 +0300
> > (Should xref pick up symbols inside comments?)
> etags does, apparently. Why else would xref show them?

I thought xref didn't use etags to deduce the symbol at point, but if
I was mistaken, so be it.

> In general, I'd say "yes", for "find references" or "find regexp" 
> results. But not for "find definitions".

Then maybe we should do something about this.

> > What am I doing wrong?
> You're calling the "find definitions" command, not the "find references" 
> or "find regexp".
> xref-find-definitions returns a set of xrefs which we don't consider to 
> be a set of "matches", currently.

The results of the two commands look very similar, and both buffers
are under XREF mode.  So I think this distinction is very confusing.
At the very least, 'r' in the buffer where the command will do nothing
but barf should not invoke the command.

> While the English language may frown on this, I think it's good that
> xref-query-replace doesn't work across the "find definitions"
> result, because if it did, you'd end up with a codebase in which the
> function's (definition is|definitions are) renamed, but all its
> usages keep referring to the old name.

It's up to the user to decide whether this makes sense, I think.  So
we could ask her for confirmation, and if given, could proceed anyway.

> Try starting with xref-find-references (bound to M-?).

When I do that from *scratch*, I get this unfriendly error message:

  Customize ‘semantic-symref-filepattern-alist’ for lisp-interaction-mode

Can we please make this work by default from *scratch*?


reply via email to

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