6

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?

2 Answers2

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