Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

closed as off-topic by Oliver Salzburg Jul 11 '13 at 16:27

  • This question does not appear to be about computer software or computer hardware within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Cross-posted unix.stackexchange.com/questions/82536/… –  Oliver Salzburg Jul 11 '13 at 16:27

1 Answer 1

This doesn't answer your question directly, but it might be good enough.

If you know the native line ending convention for the platform you're on, you can look on the left side of the Emacs mode line. If the file uses a non-native convention, you should see a notation like (DOS) or (Unix). If there's no notation, then that implies the native convention. From that, you can figure out what each line ends in.

So, for example, if you're running Emacs on a Unix system, and you open a file with DOS line endings, you should see (DOS) in the lower left of the screen.

If the line ending convention in the file is inconsistently applied, then you'll see stray ^M or ^J characters.

share|improve this answer

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