I need to see the space characters but I can't set it for the life of me.

I went to customize the Whitespace Display Mapping and this is what I found. Notice that the mapping for the space is set to be ".". It doens't work of course:

INS DEL Character Mapping:
            Char Kind: Value Menu Space
            Vector List:
            INS DEL :
                        Vector Characters:
                        INS DEL Char: .

I even included this into .emacs

(setq whitespace-display-mappings '((space-mark 32 [46])
       (newline-mark 10 [36 10]) (tab-mark 9 [187
      9] [92 9])))

Still nothing.

Maybe someone know what is the problem here? I just want the whitespace overlay to show the " " character as a ".".

Thanks for your time and help in advance.

  • 2
    The default behavior of whitespace-mode is to show a space as a centered dot character. Have you tried using whitespace-mode without making any modifications? Try opening any file in fundamental-mode and type M-x whitespace-mode without any whitespace configuration settings. – lawlist Jul 15 '15 at 22:17
  • For the record, the visual display of the space-mark it is not an overlay -- it is a glyph that is displayed via the buffer-display-table. – lawlist Jul 15 '15 at 22:25
  • 1
    Jenia Ivanov: Does your whitespace-style variable contain space-mark ? (or if using the customize interface: (Mark) SPACEs and HARD SPACEs ?) – phils Jul 16 '15 at 1:15

Your settings work. Make sure that you don't have grayish window background.

enter image description here


As phils already said in the comments whitespace-style needs to include space-mark.

See my answer here for details.

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.