Live data from Hacker News

Fuzzy Finding with Emacs Instead of Fzf

masteringemacs.org

11–17 of 17 posts

Re: Fuzzy Finding with Emacs Instead of Fzf

#11
> Emacs has better fuzzy finding

With due respect to Mr. Petersen, and as an Emacs user myself, I really can't agree. When I fire up fzf I just type and generally without any thinking I get what I want. Emacs takes some configuration to get to that point; the built in flex completion is, for whatever reason, not as robust in my experience.

In fact, in my current config I've been using fzf (or really skim) for completion within Emacs, via fussy: https://github.com/jojojames/fussy

Re: Fuzzy Finding with Emacs Instead of Fzf

#12
post #6
post #4

One slight difference: fzf is cross platform, whereas I believe his solution is not.

Should be as cross-platform as Emacs and Bash are: very cross-platform. And the Bash wrapper (ezf.sh for ezf.el) could probably be rewritten in say Powershell. Fzf is written in C, and there's a Rust implementation called skim (sk). Each of these seem very cross-platform. But the advantage this solution has is that you stay within the Emacs ecosystem with Emacs syntax/keybinds/colors etc.

Umm, fzf is written in go, not C.

Re: Fuzzy Finding with Emacs Instead of Fzf

#13
post #6
post #4

One slight difference: fzf is cross platform, whereas I believe his solution is not.

Should be as cross-platform as Emacs and Bash are: very cross-platform. And the Bash wrapper (ezf.sh for ezf.el) could probably be rewritten in say Powershell. Fzf is written in C, and there's a Rust implementation called skim (sk). Each of these seem very cross-platform. But the advantage this solution has is that you stay within the Emacs ecosystem with Emacs syntax/keybinds/colors etc.

>Fzf is written in C

That would be fzy : https://github.com/jhawthorn/fzy

Re: Fuzzy Finding with Emacs Instead of Fzf

#14

While we're on the topic of finding stuff in Emacs, check out the `consult-ripgrep` [1] command from the Consult package by Daniel Mendler. Consult coupled with Orderless [2] package is a super power. You can even export the results (using Embark [3]) into a wgrep buffer, make edits on just the search results, and have them applied across the code base! [1]: https://github.com/minad/consult#grep-and-find [2]: https:/…

I've been using Helm for everything for years and have been reluctant to switch to the Consult, Embark, Marginalia etc ecosystem. Is it worth it?

Re: Fuzzy Finding with Emacs Instead of Fzf

#15

While we're on the topic of finding stuff in Emacs, check out the `consult-ripgrep` [1] command from the Consult package by Daniel Mendler. Consult coupled with Orderless [2] package is a super power. You can even export the results (using Embark [3]) into a wgrep buffer, make edits on just the search results, and have them applied across the code base! [1]: https://github.com/minad/consult#grep-and-find [2]: https:/…

The `Emacs-wgrep` [1] package is what allows you to edit a standard Emacs grep buffer and have the specified changes applied to all the project's files. I just recently started using it, and it's extremely handy!

[1]: https://github.com/mhayashi1120/Emacs-wgrep

Re: Fuzzy Finding with Emacs Instead of Fzf

#17
post #6
post #4

One slight difference: fzf is cross platform, whereas I believe his solution is not.

Should be as cross-platform as Emacs and Bash are: very cross-platform. And the Bash wrapper (ezf.sh for ezf.el) could probably be rewritten in say Powershell. Fzf is written in C, and there's a Rust implementation called skim (sk). Each of these seem very cross-platform. But the advantage this solution has is that you stay within the Emacs ecosystem with Emacs syntax/keybinds/colors etc.

I suppose I should have been clearer: The submission is on how to get fzf behavior in Emacs without using the various fzf related packages for Emacs.

Emacs is cross platform.

fzf is cross platform.

Presumably the fzf packages for Emacs are cross platform, but I haven't checked. If any of them are, then I can have the same setup for Windows and Linux (I use Emacs on both).

With this solution, I'd need to have a different script in Windows and Linux (I don't use WSL - Emacs works quite well without it). So by cross platform, I meant "Copy config from one platform to another and just have it work".

Post reply on HN