dired-hacks icon indicating copy to clipboard operation
dired-hacks copied to clipboard

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

Open Boruch-Baum opened this issue 2 years ago • 3 comments

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

Boruch-Baum avatar Mar 11 '24 15:03 Boruch-Baum

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.

Fuco1 avatar Mar 21 '24 11:03 Fuco1

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

Boruch-Baum avatar Mar 22 '24 04:03 Boruch-Baum

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

Fuco1 avatar Mar 22 '24 12:03 Fuco1

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!

Fuco1 avatar Jun 29 '24 17:06 Fuco1