13

How can I have Emacs display the type of new character?

I am looking for something similar to what Notepadd does (see below). I read that Emacs comes with M-x whitespace-mode but this doesn't seem to show the type of ASCII control character the file uses to represent linebreaks. Am I missing anything?

enter image description here

Note: I asked this question in SuperUser but did not get an answer in 3+ months so I am hoping to try here now.

  • You did get an answer, and it's basically the same answer. – tripleee Jul 11 '13 at 5:19
  • I'm looking for a solution to this answer, and I think whitespace mode could be it... or at least it's mechanism to rewrite a character via a display_mapping. – jgomo3 Dec 3 '18 at 21:33
11

In the bottom left of your window, you have a cryptic string like 1:@**-. Hover over the colon, it'll tell you something like "line endings: unix, mouse-1 to toggle". (Incidentally, the 1 left to it is the coding system, iso-8859-1 in my case)

| improve this answer | |
  • 4
    And if you set the buffer to Unix line endings when the file contains DOS line endings, it will show the CRs as \Ms at the end of each line – Michael Mrozek Jul 10 '13 at 19:53
  • 1
    Thanks Urich and @MichaelMrozek. I was hoping that Emacs had a mode or package that would show all the special character types on the buffer (basically an enhanced whitespace mode), but I guess this is as close as I can get to it. Thanks again. – Amelio Vazquez-Reina Jul 10 '13 at 20:01

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.