swiper icon indicating copy to clipboard operation
swiper copied to clipboard

counsel-ag and ivy-restrict-to-matches

Open torstenmarek opened this issue 7 years ago • 5 comments

counsel-ag (and I would think other completions with function collections) don't work with ivy-restrict-to-matches. Is this by design? I think it should be possible to replace the collection function by the active candidates, and simply switch to a normal reader, but keeping the action.

I'm happy to contribute that feature myself, being a heavy user of counsel-ag.

torstenmarek avatar Feb 24 '17 08:02 torstenmarek

counsel-ag (and I would think other completions with function collections) don't work with ivy-restrict-to-matches. Is this by design?

Slightly by design. Since the collection function is external and handles the matches itself, it's not a given that the candidates for the pattern foobar are a subset of the candidates for the pattern foo.

Still, having ivy-restrict-to-matches work would be pretty convenient. PRs welcome.

abo-abo avatar Feb 24 '17 10:02 abo-abo

Agreed. Maybe it should be opt-in, with an argument to ivy-read.

Am 24.02.2017 11:46 vorm. schrieb "Oleh Krehel" [email protected]:

counsel-ag (and I would think other completions with function collections) don't work with ivy-restrict-to-matches. Is this by design?

Slightly by design. Since the collection function is external and handles the matches itself, it's not a given that the candidates for the pattern foobar are a subset of the candidates for the pattern foo.

Still, having ivy-restrict-to-matches work would be pretty convenient. PRs welcome.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/abo-abo/swiper/issues/902#issuecomment-282261911, or mute the thread https://github.com/notifications/unsubscribe-auth/AL4n2oQ98wP1tGFAgXO5wLfmYGPeq7l6ks5rfrTugaJpZM4MK7zr .

torstenmarek avatar Feb 24 '17 11:02 torstenmarek

Any progress onthe PR? I would love for this to be implemented.

plumenator avatar Oct 19 '17 06:10 plumenator

I'm sorry but I won't be able to work on this anytime soon.

torstenmarek avatar Oct 29 '17 16:10 torstenmarek

I'd like to note that beside counsel-ag, also counsel-rg, counsel-git-grep, counsel-grep, … also don't work with the ivy-restrict-to-matches narrowing feature.

Issue #2347 is related in a way. It suggests using swiper on the first occur buffer for narrowing results, but there is currently the problem that the new occur buffer references the old one instead of the original files.

schoettl avatar Aug 29 '21 20:08 schoettl