Fuco1 / dired-hacks

Collection of useful dired additions
GNU General Public License v3.0
873 stars 77 forks source link

feat(global-dired-collapse-mode): new feature #209

Closed Boruch-Baum closed 4 months ago

Boruch-Baum commented 7 months ago

This automatically applies dired-collpase-mode to all new dired buffers.

Fuco1 commented 7 months ago

Thank you, this is a good idea.

In Emacs there is a macro define-globalized-minor-mode for making global modes. I think it might be a bit cleaner to use it to define the global version of this mode.

Boruch-Baum commented 7 months ago

I've never used that macro because it does a lot of stuff I've never found necessary. The major advantage of it IMO is that it imposes more uniformity on Elisp code, but at the expense of bloat.

On 2024-03-21 04:07, Matus Goljer wrote:

Thank you, this is a good idea.

In Emacs there is a macro define-globalized-minor-mode for making global modes. I think it might be a bit cleaner to use it to define the global version of this mode.

— Reply to this email directly, [1]view it on GitHub, or [2]unsubscribe. You are receiving this because you authored the thread. Message ID: @.***>

References

  1. https://github.com/Fuco1/dired-hacks/pull/209#issuecomment-2011959731
  2. https://github.com/notifications/unsubscribe-auth/AAOE3KAM7XZZQBXFVU6QSBDYZK5QVAVCNFSM6AAAAABEQQC2YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJRHE2TSNZTGE

-- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0

Fuco1 commented 7 months ago

However, the bloat is invisible to the user and it adds a lot of value for maintenance.

Fuco1 commented 4 months ago

I added the global mode using the macro define-globalized-minor-mode in dab22a3dcf3b40c3be0f981eff872199a552800b . Personally I feel like the consistency and maintainability outweighs some extra maybe unnecessary code which the macro generates.

Thanks for the idea, I like it!