0

I would like to open emacs in dired mode . files and folders should be organised in most recent file first order. Moreover I would like to highlight the Org files for easy selection. Is this possible?

1 Answer 1

2

If you provide a directory on the command-line, it opens in dired mode. For example

emacs .

...will open the current directory in dired mode.

The variable `dired-listing-switches' contains the switches sent to the ls command. So adding

(setq dired-listing-switches "-lart")

to your startup config (or customizing it) should do what you want.

You can mark org files with dired-mark-files-regexp as follows:

emacs -Q . --eval '(dired-mark-files-regexp "\\.org$")' &

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.