How can I turn off the reverse video for directories in dired?

As you see emacs -Q -nw --color=never . has still too much color:

emacs -nw in dired

The only thing I want to have with white background is my cursor. Everything else should have a black background. Otherwise the only way to tell where the cursor is is looking for the blinking.

$ emacs --version
GNU Emacs 25.2.2
Copyright (C) 2017

Yes, I enjoy using old emacs versions over ssh to far away places.

3 Answers 3


Put your cursor on such a directory name and use C-u C-x =. That will tell you (at the bottom of buffer *Help*) what face is used there. In this case, it likely tells you that face dired-directory is used there:

  There are text properties here:
  dired-filename       t
  face                 dired-directory
  fontified            t
  help-echo            "mouse-2: visit this file in other window"
  mouse-face           highlight

Use M-x customize-face dired-directory to customize the face. If you change its definition to just inherit from face default then it won't look different from the non-directory files.

  • Thanks, but I chose simply a shell alias emacs="emacs -eval '(global-font-lock-mode 0)'" to make it easier to prototype to potentially hundreds of systems, without needing interaction with the "customize" system. Commented Apr 6, 2023 at 1:59

OK, looks like all there is is:

  -D, --basic-display
      This  option  disables many display features; use it for
      debugging Emacs.

Well, at least it works!

(Regarding --color=never, that is in the X-windows part of the man page, so of course it won't help.)

emacs -Q -nw -eval '(global-font-lock-mode 0)' .

Also does the job, but disables fewer features. (Although I can't tell the difference.)

  • FWIW, neither of your answers answers your question as posed. What you asked was how to (only) not have reverse video for directories in Dired. That's quite specific. Instead, your answers turn off all highlighting everywhere. (How to get repair a crack in my sidewalk? Drop a bomb - that'll remove all sidewalks. ;-))
    – Drew
    Commented Apr 6, 2023 at 14:11
  • Your only was not my only. Anyway, I also welcome other solutions that will work on readonly filesystems. I.e., no .emacs* files allowed. Commented Apr 7, 2023 at 2:28

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.