By default, Emacs quietly deletes trailing whitespaces once the user moves on to the next line. To reproduce the issue in plain Emacs, do this:
- Start plain Emacs:
emacs --no-init-file --no-site-file
- Insert trailing tabs or spaces on the first line (e.g. five spaces).
- Press enter to go to the second line.
- Now go back to the first line. The spaces we inserted in step 2 have all disappeared!
This is not good. I want to preserve the trailing whitespace I have typed. Default Emacs seems to make it impossible for me to enter trailing whitespace.
- What is the cause or rationale for this default behavior?
- How can I preserve the trailing whitespace I have entered?