I like having non-breaking spaces and a few other characters represented in my buffer as visible characters. The problem I have is that whitespace-mode seems determined to set the background color. In modes where the background color is different (for example, in src blocks in Org), the ordinary space characters are really obtrusive.
I can workaround this by not having those blocks appear in a different background color, but that seems like it shouldn't be necessary.
I've tried a few things that I've found by searching, but none appear to work.
whitespace-mode
specific answer, and more would be required such as a recipe to reproduce what it is you are seeing so that awhitespace-mode
only answer can be written. – lawlist Oct 17 '19 at 19:15nobreak-space
is an Emacs face that can be customized; e.g.,M-x customize-face
. You can remove or change the background color if so desired ... Here is how one might programmatically set a face with a foreground color of blue and no background color:(face-spec-set 'nobreak-space '((t :foreground "blue")))
. There other functions that are more popularly used to set faces; e.g.,set-face-attribute
, etc. – lawlist Oct 17 '19 at 19:31