Freaking Annoying Emacs Queries
(Or "This file does not end in a newline. Add one?")
Obligatory Disclaimer
- The content of this page, and the opinions expressed within, may or may not be representative of my own ideas. They do not, however, reflect the views of the University of Michigan in any way.
- I am not nearly an authority on any of this. So all the information that follows can be outright wrong. Use any of it at your own risk. I am not responsible for any resulting damages. If this scares you, stop reading.
The Actual Tip Follows
Do recent Emacs on recent Red Hat/Fedora Core distributions drive you insane with their incessant "This file does not end in a newline. Add one?" queries?
No god damn it. I DON'T WANT TO ADD A NEW LINE. I WANT NO NEW LINE AT THE END OF THE DOCUMENT. NO NEW LINE.
GOD. ARGGGGH.
Some reading up resulted in figuring out two ways of fixing this.
-
If you have root access, do everybody a favour and replace the line
(setq require-final-newline 'query)with(setq require-final-newline nil)in the file /usr/share/emacs/site-lisp/default.el.
-
If you can't become root, just prevent it from reading this retarded default.el file by adding to your ~/.emacs:
(setq inhibit-default-init t)
Sometimes, you wonder what goes through the minds of the geniuses behind these decisions.