Subject: bug#49731: 28.0.50; Filter xref results by filename

From: Juri Linkov <[email-masked]>
Date: Wed, 28 Jul 2021 19:12:49 +0300

>> I see it less useful for example when you place the point in an
>> identifier and press M-?.  You'll want to see all the references first,
>> and then filter afterwards if they are too many.  But I think it's a
>> matter of personal preferences and different workflows.
>
> Agree on both counts. Except for xref-find-apropos: it usually works more
> similarly to xref-find-references.

Thanks for mentioning xref-find-references and xref-find-apropos.
I tried them out, but they are broken:

1. while xref-find-references works fine in `emacs -Q`,
I don't know why with my customization typing e.g.
'M-? isearch-lazy-highlight RET' reports
"No references found for: isearch-lazy-highlight".

2. xref-find-apropos doesn't offer the identifier at point as its
default, and after using it e.g. from the buffer isearch.el with
'C-M-. isearch-lazy-highlight RET' all its lines are concatenated
on the same line in `emacs -Q`:

> Speaking of 'f' and 'q', do we have a precedent for this kind of
> interaction somewhere else in Emacs? I'm not against those per se, but I'd
> really rather we try to follow one of the existing workflows, so that the
> users wouldn't have to remember yet one more thing. Hence the idea from
> package.el.

I see no reason to be different from package-menu-filter where
'/ /' resets all filters.  Then maybe add '/ i' to include, and
'/ e' to exclude.