alexluigit / dirvish

A polished Dired with batteries included.
GNU General Public License v3.0
817 stars 45 forks source link

Thank you! #34

Closed noctuid closed 2 years ago

noctuid commented 2 years ago

Thank you so much for this package. You've done a brilliant job. This is not an issue. I just wanted to say how great this package is and try to explain why it's so great. This may not be very useful to you, but it might help someone else considering trying it. Feel free to link to this blurb in the readme if you want. I don't think the readme makes it immediately clear just how awesome dirvish is. From a brief glance at the readme, it looks like dirvish might just be another package like dired-hacks that adds some nice extra functionality, but after trying it, I can say that dirvish has completely changed the experience of dired for me in a single day. I plan to write a full blog post once I play with dirvish more.

I randomly found out about dirvish the other day and then saw a comment you had made about it:

With all the things being done, I found myself still miss lf/ranger very often. I also found that a lot of people are using ranger/lf in a terminal/shell inside of Emacs. If Dired is really far better than those ones, why would people do that? You might say, because they don't understand enough about dired/emacs/elisp. But I don't see it that way, instead I believe ranger/lf or other similar ones really did something right, and Dired should absorb their good points.

Once I read this and your readme, I was already sold on trying dirvish. I've used both ranger and dired extensively, and this matches my experience exactly. Most Emacs users say that dired is much better than ranger, but I think they are often the ones who don't understand enough about ranger. Dired can do a lot of useful things as a result of being part of Emacs and is a lot more malleable. Obviously I'd prefer to use it, but there were just too many issues or missing features for dired to be able to replace ranger for me.

Every now and then I stumble upon a new package that is not just useful but transformational. After haven been beaten down by the clunkiness of ranger.el for so long, I was elated after trying dirvish.

Dirvish is a work of art. It is fast. It is unobtrusive. It is elegant. It is exactly what a file manager in Emacs should be.

The name is perfect. Not just stylish but also meaningful. While it is nothing like vim-dirvish, it has the same design philosophy of working with builtin functionality. In the context of Emacs, this means augmenting dired rather than replacing it. The simplicity of the current implementation of dired-yank is a testament to how well this works. There's no reason to try to duplicate ranger exactly. Dirvish's multi-stage marking is actually better than ranger's because it doesn't force the user to pick "cut" or "copy" at the beginning. While you normally know what you want to do beforehand, ranger also has a bunch of options for pasting (e.g. paste symlink, relative symlink, hardlink, etc.). You can choose "delete" in ranger and then actually just make a symlink, which doesn't really make sense. It makes more sense to just choose what you want to do with marked items all in one step instead of partially at the beginning and partially at the end.

Dirvish has fixed every major issue I had with dired and ranger.el:

;; prevent ranger from using `evil-make-overriding-map' and making the initial
;; evil state motion state
(general-add-advice '(ranger-define-additional-maps ranger--normalize-keymaps)
                    :override #'ignore)
...
;; completely delete ranger-mode-map
(setq ranger-mode-map (make-sparse-keymap))
...
;; make ranger quiet
(general-add-advice '(ranger-window-check ranger-revert)
                    :around #'noct-no-message)

Ranger.el is a good package that adds functionality I was missing from dired, but dirvish is polished and has a more general appeal. The ingenuity of dirvish may not be obvious to someone who has not used both ranger.el and ranger for years, but for me, dirvish is revolutionary. The experience of everything "just working" in dirvish with basically no setup is absolutely sublime. Dirvish is dired, just refined. Like orderless and vertico, dirvish is another good example of an actual case where less is more.

I came to Emacs using a wide ranger of TUI applications (vim for editing, mutt for email, weechat for IRC, ncmpcpp and vimus for music, etc.). Ranger is my last TUI application and has been for years. I thought I would be using ranger as my main file manager indefinitely. Maybe ranger.el would find a new, more active developer, or an alternative package would appear that would eventually be good enough for me to switch, but that wouldn't happen any time soon. I thought ranger was still lightyears ahead of dired, but dirvish has proved me wrong. Thank you!

alexluigit commented 2 years ago

I'm not sure if you're the first one to recognize the true values of dirvish, but definitely the first one to describe them so precisely, much better than what I've done. I will link this comment in the readme for sure, and thank you a million for posting this!

I had been a terminal user for years before I switched to Emacs, and I have a very similar experience with you on rebuilding my workflows in Emacs. For a specific featureX in Emacs, I usually first started to use it with minimal configuration, then customize it, possibly bring in complementary packages for it, eventually it reached a "sweet point" where I feel the featureX is nice and integrated enough to replace my old workflow. This sums up my experience with org-mode, magit, vertico and friends, and so much more. However, this "sweet point" never occurred to me in terms of Dired, no matter how it is configured, it always feels weird. Dired is good enough as a "ls" interface along with a bunch of useful commands. But that's it, it is just a DIRectory EDitor, it did not provide necessary components or API as a file manager, which explains why almost all the third-party Dired packages are more or less problematic.

Meanwhile, the process of managing my Emacs configuration gives me a better understanding on what Emacs can do with just inbuilt libraries (comparing to my first day with Emacs), I realized that Emacs has more than enough infrastructures to build a modern file manager that is at least as good as ranger/lf, if not better. But in reality we only have something like ranger.el which comes with a lot of problems as you have described above. Being frustrated by this situation, I finally made dirvish.

On a side note, I had doubted myself several times before making the decision of start a file manager from scratch or make one based on Dired. It is actually far more difficult to write something like Dirvish than create a fresh new one, because base on Dired means a lot more to consider and respect, I was not even sure if I can make it. Your comment in this post made me believe that Dirvish is probably in the right path.

Also, I've read all the proposals you provided, generally they all looked good to me, but it might takes sometime to implement all of them, especially the dirvish-yank part, which is undergoing a somewhat big refactoring. I'll reply you in relevant issues when any progress is made.

Anyways, thanks very much for your awesome feedback, please accept my sincere appreciation!

noctuid commented 2 years ago

However, this "sweet point" never occurred to me in terms of Dired, no matter how it is configured, it always feels weird. Dired is good enough as a "ls" interface along with a bunch of useful commands. But that's it, it is just a DIRectory EDitor, it did not provide necessary components or API as a file manager, which explains why almost all the third-party Dired packages are more or less problematic.

This was my same experience. I've used Emacs for 7+ years at this point. Migrating required a mental shift for some applications, but it didn't take long for me to fully switch, and I gained a lot of extra functionality by switching (especially in the case of magit). But that never happened for ranger even with ranger.el. I made some basic use of it in programming project directories but only used ranger for general file management/browsing. There seems to be a negative impression of ranger/lf/etc. by people who haven't tried them. It's not easy to quickly explain. I plan to write a blog post giving more concrete examples comparing dired, ranger.el, ranger, and dirvish when I have some time.

On a side note, I had doubted myself several times before making the decision of start a file manager from scratch or make one based on Dired. It is actually far more difficult to write something like Dirvish than create a fresh new one, because base on Dired means a lot more to consider and respect, I was not even sure if I can make it. Your comment in this post made me believe that Dirvish is probably in the right path.

It's very impressive to me that you've been able to do this. In the vim community, everyone recreates their own file manager. It's not necessarily a bad thing, but in the case of Emacs, I don't think there's anything fundamentally broken about the dired experience. I love a lot of things about it (wdired, integration with other packages/functionalities like TRAMP and embark-export, scriptability in elisp), but especially without fast multi-stage copy/paste and fast preview, it wasn't a suitable replacement for ranger for me.

The experience of dirvish is surreal and even bizarre after all these years of trying to use dired. Like how professionals make their craft look easy, dirvish does something similar with how it builds on dired. Dirvish is paradoxical in that it provides a completely different experience while still fundamentally being dired at its core. If I didn't know better, I might not think it was that big an improvement. Having used dired packages that make attempts at similar functionality like dired-k, all-the-icons-dired, the previous preview packages, and the multi-stage copy/paste implementation, I'm in disbelief. None of these packages were really satisfactory. They were slow, visually clunky, or inadequate in some way. In the case of ranger.el, it was not dired and always felt off. These packages show that adding these features to dired is very hard. For you to have been able to implement all of these functionalities in such an polished way in dirvish is really special.

I've only been using it for a couple of days, so maybe I will run into some quirks at some point, but to work this well out-of-the box is not something I've seen from anything else. So far it Just Works™.

Also, I've read all the proposals you provided, generally they all looked good to me, but it might takes sometime to implement all of them, especially the dirvish-yank part, which is undergoing a somewhat big refactoring. I'll reply you in relevant issues when any progress is made.

Take your time. Hardlink support is probably the only thing I personally need to completely stop using ranger. The others would be nice to have have (especially #27, #28, and #30), but dirvish already provides a compelling experience.

alexluigit commented 2 years ago

There seems to be a negative impression of ranger/lf/etc. by people who haven't tried them. It's not easy to quickly explain.

Indeed, I agree ranger and alike file managers deserve a better evaluation. Although I didn't like ranger at the first sight, eventually I recognized the goodness of it, that is: it is "close to the metal" (working with text) meanwhile feel intuitive (perfect amount of graphical elements).

I plan to write a blog post giving more concrete examples comparing dired, ranger.el, ranger, and dirvish when I have some time.

I just finished the rewrite of dirvish-yank.el. I haven't fully tested it yet, so it probably feel buggy somewhere, but for now, it works like it should on my machine. Just try it out before you write the blog :smile: .

Dirvish is paradoxical in that it provides a completely different experience while still fundamentally being dired at its core.

This is the best description for dirvish I've seen so far, I really like it. Do you mind if I use this as the repo description? Of course I'll credit your name in the readme for this. Or do you have any better suggestions on this? I plan to write a more concise and appealing readme in the near future.

noctuid commented 2 years ago

Do you mind if I use this as the repo description?

Sure, you can.

Or do you have any better suggestions on this? I plan to write a more concise and appealing readme in the near future.

I don't have any right now. I think it's a package that is hard to describe well in one line.

I just finished the rewrite of dirvish-yank.el. I haven't fully tested it yet, so it probably feel buggy somewhere, but for now, it works like it should on my machine.

Thanks! It is working fine locally. I will try with TRAMP tomorrow. Not sure how easy it is to implement, but would it also be possible to have the equivalent of ranger's paste hardlinked subtree? This allows hardlinking a directory.

Also, could you add autoload cookies for the new yank commands?

jcguu95 commented 2 years ago

Thank you for the post. I can attest that dirvish is a pearl! When I first loaded it in emacs, I felt no clunkiness, and I wanted to scream. This is truly a no.1 dream software I've been thinking of. Ranger is the last obstacle that kept preventing me moving completely into emacs. And, here, I, am!