[OS X Emacs] getting dired to behave sanely

Christian Lynbech christian at defun.dk
Thu Feb 28 15:25:31 EST 2013


Dired is quite accomplished tool, so there may be ways to get it to do
what you want. Basically, it just calls 'ls' so you should try to find
some suitable options to 'ls', and/or tweak the environment of emacs
appropriately. If the list produced in the shell comes out in the right
way in a shell, then it should look ok in dired as well when subjected
to the same treatment.

I do not know if there is an easy way to get 'ls' to sort by type, here
you must study the man page. For the case sensitivity, one way to do
that is to tweak the LANG/LC_* environment variables. Different
languages have different sorting styles so it is matter of finding the
right one. Personally, I have been accustomed to have captial letters
come before the non-capital ones, and I have forced that by setting
the following environment variable.

        LC_COLLATE=en_US.UTF-8

Check the documentation on `dired-listing-switches' and `setenv' for
more information.

------------------------+-----------------------------------------------------
Christian Lynbech       | christian #\@ defun #\. dk
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - petonic at hal.com (Michael A. Petonic)



More information about the MacOSX-Emacs mailing list