1

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.

Drew
  • 75,699
  • 9
  • 109
  • 225
Dan Jacobson
  • 113
  • 5

3 Answers3

1

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.

Drew
  • 75,699
  • 9
  • 109
  • 225
  • 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. – Dan Jacobson Apr 06 '23 at 01:59
0

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.)

Dan Jacobson
  • 113
  • 5
0
emacs -Q -nw -eval '(global-font-lock-mode 0)' .

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

Dan Jacobson
  • 113
  • 5
  • 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 Apr 06 '23 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. – Dan Jacobson Apr 07 '23 at 02:28