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
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$")' &