Subject: bug#19468: 25.0.50; UI inconveniences with M-.

From: Stefan Monnier <[email-masked]>
Date: Mon, 27 Apr 2015 19:19:16 -0400

>>> btw the defun I'm probably after is not the first or second hit there;
>>> looks like the candidates are arranged in the alphabetical order of
>>> the *.el files).
>> Indeed, the ordering looks incorrect.  This is a bug.
> The idea here is to group candidates belonging to different
> files together.

That makes a lot of sense when the candidates are equally likely to be
The One that the user's looking for.  In the case of etags I think the
problem comes from the substring matching it uses.
Can't etags do better than substring matching and only return matches
that actually have the requested name (and maybe fallback on substring
matching if there's no exact match)?

        Stefan