Gray text highlighting no longer works on my Debian/stretch system. While this is particularly annoying in Emacs, it's not a specific Emacs problem; gray background is also gone from other applications, including the web browser. Therefore I asked for help at Unix SO.

I do however have an Emacs-specific question: Are there ways of active-region highlighting other than gray background? I would like to try them out in order to narrow down the gray-background-is-gone bug.

  • This might help you out. Jan 1 '16 at 16:22
  • 1
    Thank you, this fully answers my question. If you repost it as an answer, I'll accept it at once.
    – Joachim W
    Jan 1 '16 at 16:25
  • No problem, glad I could help. :) Jan 1 '16 at 16:30
  • FWIW, I think this question is a duplicate, but I don't have time to search for it.
    – Drew
    Jan 4 '16 at 6:32

What you're looking for is the region face. Put this in your .emacs file and change #666 to any color you want:

(set-face-attribute 'region nil :background "#666")

You could also then change the font color to make it more readable. E.g. to white

(set-face-attribute 'region nil :background "#666" :foreground "#ffffff")

Sources: This Question answered by tungd and Philippe.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.