windows 10, Emacs 26.1, Dired+

Suppose I has 3 files and sort it by name in dired mode.

Smt like this:

enter image description here

OK. Now I sort it by date, press s

Here result:

enter image description here

OK. Now I edit file 3.txt and after save data in this file I return to dired by press dired-jump (C-x C-j). And here result.

enter image description here

As you can see it again sort by name but I need to sort by date. Why dired+ not save my sort mode?

1 Answer 1


dired-jump (C-x C-j) just invokes command dired, which gives you a new Dired buffer, with the default switches from dired-listing-switches.

You can customize dired-listing-switches to whatever you want.

If you expect to return to an existing Dired buffer, which already uses the switches you want, then use C-x b to switch to that buffer.

If you want to automatically change the default switches to use each time you use s in Dired (that is, automatically modify dired-listing-switches), so that another, arbitrary use of dired uses the latest ones, then you'll need to program that. You can, for example, advise dired-sort-toggle-or-edit (which is bound to s in Dired mode).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.