In emacs dired-mode, when I press s I can toggle between alphabetical and chronological sorting of files. Usually, I always prefer chronological sorting, but alphabetical sort is the default. How can I customize emacs to always have a dired buffer first show up chronologicaly sorted?
Asked
Active
Viewed 2,689 times
6
Christian Herenz
- 482
2 Answers
5
I am just repeating @lawlist comment:
Customize the variable
dired-listing-switches
For example: M-x customize-variable RET dired-listing-switches
Fill the field with -lt
Or just setq it in your .emacs or init.el with:
(setq dired-listing-switches "-lt")
nephewtom
- 3,217
0
I recently discovered this package in melpa, which makes (persistent) sorting in dired very easy: https://gitlab.com/xuhdev/dired-quick-sort
Christian Herenz
- 482