-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dired): restructure the module based on dirvish #6760
base: master
Are you sure you want to change the base?
Conversation
Thank you so much! I have been dying for a proper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When it comes to the emacs bindings, they look reasonable to me.
@LemonBreezes , no problem! And FYI now the syntax is |
Hi @UndeadKernel , thanks for your review. I've also included |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The emacs bindings still look good.
I would consider removing the +bindings
flag and leave your proposed bindings on by default. This would be in line with Doom's motto of being an opinionated
distribution.
Thanks. Fixed it as you suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! This looks great! Thanks also for focussing on the documentation.
I saw that the module includes dirvish by default. I do not think this is a good idea because there will be users that prefer to use standard dired. Does this module provide any non-dirvish related configuration? If not, can we rename this module to dirvish? If yes, can we make dirvish an optional flag?
What do you think?
Hi @dschrempf , thanks for the review.
A main benefit of using dirvish by default is that it rendered these extra packages and their associated hacks obsolete, we only need dirvish and diredfl in packages.el. A optional +dirvish flag (like the current state) actually does not fit in with the module very well. One can have the classic dired interface by the following settings: (not exactly the same, but very similar) (setq dirvish-attributes nil
dirvish-use-header-line nil
dirvish-mode-line-format nil
dirvish-hide-details nil
dirvish-hide-cursor nil) I can either add it to the documentation or rename the module to dirvish. I'm okay on both. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I'm enthusiastic about what it offers, but there are a few issues that must be sorted out first; mainly:
-
To conform to our commit conventions (For example: ce10a12 should be a
bump
commit, and df986b3 should likely be considered a breaking change). -
Restore
+dired-disable-gnu-ls-flags-maybe-h
, as recalculatingdired-actual-switches
buffer-locally was an intentional effort to support dired over TRAMP, where we can't assume anything aboutls
(or was changing that meant to imply that dirvish handles this somehow?). -
To rethink the keybinds. I'm a tad allergic to modules adding more
:leader
keybinds. More so when they are conditional. -
Regarding @dschrempf's point. I agree in principle. Enabling dired should produce a reasonably dired-like experience, which is not so much the case with on-by-default dirvish. However, there is a clear benefit to leaving it installed by default, so how about this:
We keep the
+dirvish
flag, but its presence will not have any bearing on whether dirvish gets installed or not. Its absence will merely unset the 5 variables you mentioned, and the result is (near-enough) classic dired minus its rough edges. Activating the flag will do the opposite, and you get the dirvish experience, as intended. What do you think?
Anyhow, this requires a more careful review, which I'm a bit too swamped to write at this very moment. The above is more to let you (and future Henrik) know that this PR hasn't gone unnoticed, and what's in store for it. In the meantime, I've converted this into a draft while I figure out how best to go about it.
Thanks for your review, @hlissner.
Sorry for that, I've squashed them into a single commit.
Yes, it has already handled by dirvish, see: https://github.com/alexluigit/dirvish/blob/132fc6ce95c4d2b491519f5a183bbfb755b34cc8/dirvish-tramp.el#L39-L63
I've reverted all the changes in +emacs/evil-bindings.el. The only thing doesn't look quite right to me is the keybinding for "Open project sidebar (SPC o p)": for now it is mapped when user enabled neotree or treemacs (both are modules turned off by default), but
Implemented as you described. The line highlighting from dirvish is also removed when
Please take your time, and let me know what I can do from my end when you got the chance to review it. |
faf65e9
to
ace564e
Compare
alexluigit/dirvish@73dcaa404da9 -> alexluigit/dirvish@4fe9c0089430 This "lateral" bump buys us more time until doomemacs#6760 lands. `dirvish`'s repository apparently rebased the commit we have pinned. Visiting it gives us: ``` This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. ``` Te new pinned version references the same commit contents, but on a new position. They're correctly identified as identical by git. The new commit also contains an explicitly reference to the old one: ``` Former-commit-id: 73dcaa4 ``` Ref: https://github.com/alexluigit/dirvish/compare/73dcaa404da9..4fe9c0089430
emacs-straight/undo-tree@e326c6135e62 -> emacs-straight/undo-tree@16f4121032d0 emacsmirror/git-timemachine@ca09684e9476 -> emacsmirror/git-timemachine@d8ffd0d7cc4a ideasman42/emacs-undo-fu-session@3e810c7c9ab7 -> ideasman42/emacs-undo-fu-session@7b3fd0647dd1 ideasman42/emacs-undo-fu@ab8bc10e424b -> ideasman42/emacs-undo-fu@0e22308de833 purcell/ibuffer-vc@5fa6aea09bc6 -> purcell/ibuffer-vc@9204001d1c5c rmuslimov/browse-at-remote@cef26f2c063f -> rmuslimov/browse-at-remote@c020975a8914 :emacs dired was omitted from this bug because of #6760.
emacs-straight/undo-tree@e326c6135e62 -> emacs-straight/undo-tree@16f4121032d0 emacsmirror/git-timemachine@ca09684e9476 -> emacsmirror/git-timemachine@d8ffd0d7cc4a ideasman42/emacs-undo-fu-session@3e810c7c9ab7 -> ideasman42/emacs-undo-fu-session@7b3fd0647dd1 ideasman42/emacs-undo-fu@ab8bc10e424b -> ideasman42/emacs-undo-fu@0e22308de833 purcell/ibuffer-vc@5fa6aea09bc6 -> purcell/ibuffer-vc@9204001d1c5c rmuslimov/browse-at-remote@cef26f2c063f -> rmuslimov/browse-at-remote@c020975a8914 :emacs dired was omitted from this bug because of doomemacs#6760.
Hi @alexluigit, thank you very much for your work! Thank you again :) |
alexluigit/dirvish@73dcaa404da9 -> alexluigit/dirvish@4fe9c0089430 This "lateral" bump buys us more time until doomemacs#6760 lands. `dirvish`'s repository apparently rebased the commit we have pinned. Visiting it gives us: ``` This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. ``` Te new pinned version references the same commit contents, but on a new position. They're correctly identified as identical by git. The new commit also contains an explicitly reference to the old one: ``` Former-commit-id: 73dcaa4 ``` Ref: https://github.com/alexluigit/dirvish/compare/73dcaa404da9..4fe9c0089430
emacs-straight/undo-tree@e326c6135e62 -> emacs-straight/undo-tree@16f4121032d0 emacsmirror/git-timemachine@ca09684e9476 -> emacsmirror/git-timemachine@d8ffd0d7cc4a ideasman42/emacs-undo-fu-session@3e810c7c9ab7 -> ideasman42/emacs-undo-fu-session@7b3fd0647dd1 ideasman42/emacs-undo-fu@ab8bc10e424b -> ideasman42/emacs-undo-fu@0e22308de833 purcell/ibuffer-vc@5fa6aea09bc6 -> purcell/ibuffer-vc@9204001d1c5c rmuslimov/browse-at-remote@cef26f2c063f -> rmuslimov/browse-at-remote@c020975a8914 :emacs dired was omitted from this bug because of doomemacs#6760.
I rebased this PR in hpfr@67d83b8 (https://github.com/hpfr/doom-emacs/tree/dirvish). Some simple conflicts with the doom-package link churn had to be resolved. I wrote most of what follows a couple months ago but never got around to posting it. To summarize, I think some polishing and tweaks are necessary for a broad (Doom-sized) user base, particularly given Dirvish’s size and scope. Lately it seems like the maintainer hasn’t been around as well, which does not bode well when it comes to the corner cases a Doom-sized user base will encounter. Felt obligated to test this after complaining about crashing in the original PR. With this PR it’s gone 🎉. What follows is a brain dump from daily driving this over the last few days. Issues:
Ramblings about upstream concerns as opposed to the Doom module
I don’t think Henrik tried the module when he made his I guess this probably comes off as very critical since I’m just dumping places I’m tripping over, but to be clear, I can already tell this is an incredible labor of love and I’ve noticed lots of nice details even without playing with some of the more powerful features yet, so thanks very much for your time and effort. Brilliant work. |
Thanks for the confirmations, but there’s really no need to quote the entire diatribe when your reply directly follows 😅 |
alexluigit/dirvish@73dcaa404da9 -> alexluigit/dirvish@4fe9c0089430 This "lateral" bump buys us more time until doomemacs#6760 lands. `dirvish`'s repository apparently rebased the commit we have pinned. Visiting it gives us: ``` This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. ``` Te new pinned version references the same commit contents, but on a new position. They're correctly identified as identical by git. The new commit also contains an explicitly reference to the old one: ``` Former-commit-id: 73dcaa4 ``` Ref: https://github.com/alexluigit/dirvish/compare/73dcaa404da9..4fe9c0089430
emacs-straight/undo-tree@e326c6135e62 -> emacs-straight/undo-tree@16f4121032d0 emacsmirror/git-timemachine@ca09684e9476 -> emacsmirror/git-timemachine@d8ffd0d7cc4a ideasman42/emacs-undo-fu-session@3e810c7c9ab7 -> ideasman42/emacs-undo-fu-session@7b3fd0647dd1 ideasman42/emacs-undo-fu@ab8bc10e424b -> ideasman42/emacs-undo-fu@0e22308de833 purcell/ibuffer-vc@5fa6aea09bc6 -> purcell/ibuffer-vc@9204001d1c5c rmuslimov/browse-at-remote@cef26f2c063f -> rmuslimov/browse-at-remote@c020975a8914 :emacs dired was omitted from this bug because of doomemacs#6760.
alexluigit/dirvish@73dcaa404da9 -> alexluigit/dirvish@4fe9c0089430 This "lateral" bump buys us more time until doomemacs#6760 lands. `dirvish`'s repository apparently rebased the commit we have pinned. Visiting it gives us: ``` This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. ``` Te new pinned version references the same commit contents, but on a new position. They're correctly identified as identical by git. The new commit also contains an explicitly reference to the old one: ``` Former-commit-id: 73dcaa4 ``` Ref: https://github.com/alexluigit/dirvish/compare/73dcaa404da9..4fe9c0089430
Sorry for the tremendous wait! I plan to test this PR this weekend, formulate a proper review, and address the points in @hpfr's post. I'm a bit out of the loop, so if there are any blockers or pressing concerns with the PR's current state or upstream packages (besides what's already been mentioned), please let me know! |
I guess I already mentioned this, but I’ll call it out here just in case. I don’t know if you want to go to the trouble of reviewing given that the maintainer looks to be completely inactive in recent months, unless you are willing to maintain a fork of the package. |
Well, if you still want to take a look, I rebased once more on master at https://github.com/hpfr/doom-emacs/tree/dirvish. I had to resolve the nerd-icons swap, but I don’t currently use icons so it’s untested. I also bumped the module packages Edit: One more rebase resolving nerd icons docs replacement and nerd-icons-dired bump |
Rebased this again on the latest Doom master: https://github.com/pharcosyle/doomemacs/tree/dirvish |
This is another temporary fix to buy us more time until doomemacs#6760 lands.
Deprecate
+ranger
flag, use dirvish by defaultSee: Thank you! alexluigit/dirvish#34
Bump the package version for diredfl and dirvish
Reimplement
+icons
, deprecate package all-the-icons-diredall-the-icons-dired is very slow on large directories, while dirvish render icons lazily.
Use
vc-state
from dirvish, remove diff-hl-dired-modeexternal process and update the UI in an nonblocking fashion.
Use
git-msg
from dirvish, deprecate package dired-git-infoSame reasons as in diff-hl-dired-mode.
Use utilities in dirvish-yank.el, deprecate package dired-rsync
dirvish-yank
has inbuilt support for rsync.Use dirvish-fd, deprecate package fd-dired
dirvish-fd
is way more powerful than fd-dired and integrates flawlessly with dirvishRemove the gnuls check on remote hosts
dirvish checks gnu ls availability for each remote host.
Set
dired-hide-details-hide-symlink-targets
to t (default)We have symlink target showing on the modeline
Add a few sensible keybindings globally
New default dired bindings
Fixes #6562
Replaces #6568
Screenshots:
Before
See: #6568
After
Dired in single window:
Dired in fullscreen (dirvish):
Dired as project sidebar (dirvish-side):