2
votes

I have search the web. I have tried color-theme (perhaps I need to create my own, but really I have my emacs set up the way I want it except for this ONE thing, and I could not find a color theme that was acceptable to me).

I just want to change the color of the directories in dired-mode. I have several custom colors changed in my .emacs, like:

(set-face-foreground 'font-lock-comment-face "yellow" )

But I just don't know what face to change for the directories in dired mode.

Can anyone help?

Thanks!

6

6 Answers

7
votes

If you move point to the place that's displaying the color you want to change and run M-x describe-face, it will tell you the face for the text at point and that face's properties.

For me, it's dired-directory, not font-lock-comment-face.

2
votes

Well, I managed to list the faces by doing M-x list-faces-display, and then I found the faces that had the dark blue that I didn't want, and, although none of the face descriptions said anything remotely like "Directory Name in dired", I just changed all of the faces that had unreadable colors, and my problems were solved!

1
votes
(set-face-foreground 'dired-directory "yellow" )
1
votes

The easiest way is to run:

M-x customize-face dired-directory

You'll then be presented with a menu of attributes you can customize. Select Save for future sessions and your .emacs will automatically be updated to make the change permanent.

1
votes

diredful (dired colorful) worked for me.

https://www.emacswiki.org/emacs/Diredful

https://github.com/emacsmirror/diredful

To match directories:

  1. Pattern: d.*
  2. Select regexp on whole line (so it matches the permissions containing the 'd')
  3. Check apply to Dirctories
  4. Style the colors.
0
votes

if you are using an older version of emacs (i tested emacs 21) try "list-text-properties-at" instead of "describe-face". for me, it shows the directory face as "font-lock-function-name-face".