3 ms·
I use fzf as well, but I don't think it's quite comparable to the kind of ad hoc browsing we can do in a GUI desktop environment or in Emacs. Yes, 'fzf --multi
by susam 1y ago
I use fzf as well, but I don't think it's quite comparable to the kind of ad hoc browsing we can do in a GUI desktop environment or in Emacs. Yes, 'fzf --multi' lets us select multiple files, but it's not really the same as casually browsing through a directory. For example, we might find an image file and preview it, or open a PDF just to skim it, and then mark that file and move on, and continue browsing files in this manner until we've gathered everything we need. That sort of exploratory, flexible interaction feels quite different.
Shell tools, Unix utilities, and 'fzf --multi' are definitely very powerful. But at least to me, they don't seem to offer the same kind of spontaneous browsing and editing experience, I'm referring to.
To be clear, this isn't some sort of competition! I'm not claiming one approach is superior to the other. Every tool has its strengths. My comments highlighting the features of Emacs do not imply that other tools are inferior. Quite the contrary!
I'm very fond of computing and I enjoy having a broad set of excellent tools at my disposal. The only point I disagree with is the claim that "all your examples are easily done in a shell". In my experience, the kind of random, ad hoc browsing, previewing, editing, marking and unmarking files, I'm talking about isn't quite as straightforward in the shell. It's certainly possible, but it doesn't feel as seamless or fluid as it does in Emacs. But again, this is not a competition. This is just an acknowledgement that different tools do different things!
I regularly rely on commands like 'find ... -exec', 'xargs', 'fzf', etc. But I also use Dired (and Emacs, in general) extensively. I find familiarity with both styles of tools very useful and the knowledge of both types of tools are transferable across a wide range of systems and environments.
- imiric 1y agoSure, fzf alone doesn't quite deliver the same UX if you need to visually preview the files. It does support sixel and other preview options though[1], and I'm sure that kind of workflow could be put together in other ways, but I can see how the experience would be better in a GUI tool. To be fair, I think this feature is not built into dired either and would require an additional package[2], so it still requires some customization as well. > In my experience, the kind of random, ad hoc browsing, previewing, editing, marking and unmarking files, I'm talking about isn't quite as straightforward in the shell. It's certainly possible, but it doesn't feel as seamless or fluid as it does in Emacs. But again, this is not a competition. Certainly. We should all use the tools we feel most comfortable with. And, frankly, the kind of visual selection you mentioned is not something I frequently do myself. In the rare cases I've had to, I was fine with a more rudimentary approach of previewing the files in whatever program can read them and mapping them to filenames manually. Doing this with dired, fzf with preview mode, or in a proper file manager, whether that's in a terminal with something like lf or in a more featureful GUI one, would've probably been faster. That said, I was also objecting to your original claim that this cannot be easily done with standard Unix tools. At the end of the day, the choice of tools and what is easier to accomplish is subjective. I personally don't like relying on a single tool for my workflows, so I use Emacs strictly for editing text files. I even prefer the Git CLI over Magit, which is pretty blasphemous in the Emacs world. :) And I really like composing small purpose-built tools in the shell, especially if I can repurpose them in some way I hadn't done before, so using the shell instead of a file manager feels more natural to me. But they're all preferences, and it would be silly to claim that one is objectively inferior or superior to another. Cheers! [1]: https://github.com/junegunn/fzf?tab=readme-ov-file#previewing-an-image https://github.com/junegunn/fzf?tab=readme-ov-file#previewin... [2]: https://github.com/protesilaos/dired-preview https://github.com/protesilaos/dired-preview
- susam 1y ago> To be fair, I think this feature is not built into dired either and would require an additional package[2] It is not part of Dired but it is part of Emacs, so it works out of the box. For example, in plain vanilla Emacs, if we type C-o on a PDF file displayed in Dired, it opens up the PDF file in a split window using doc-view. Similarly, if I type C-o on a PNG file, it opens up the PNG file using image-mode in a split window. So you're right that this isn't part of Dired but it is part of Emacs, so all of this works out of the box in vanilla Emacs with zero customisations.