Customizing a Font-Face (dired directories)

Table of Contents

img

I sensed I could improve how my directories appeared in dired, instead of just being bold-face. The question was, how to find which face to change to get the desired result? Digging through my customize-faces options was tedious and sometimes misses the tree for the forest unless you know which one you’re looking for.

Locating the face at point

img

Enter the beautiful self-documenting nature of Emacs. Put your cursor on the thing you want to change (remember, our whole philosophy emacs inherited from *Nix is that everything is text). Then do C-u C-x = (what-cursor-position) and you’ll get a buffer telling you more than you wanted to know about the text you’re on top of. For us, we just want to know the faces at hand; give them a search and then you’ll know just which to change in customize-face. Voila!

Customize face

img

Mine was diredp-dir-name. Emacs Faces are beautifully customizable (I wish CSS was so easily solved), so I gave mine a text-box and was all set.

Tory Anderson avatar
Tory Anderson
Full-time Web App Engineer, Digital Humanist, Researcher, Computer Psychologist