Go away auto-fill!
An annoying fill mode of emacs:
Any line that is too long in any text file, emacs will automatically insert a text break when you press space or enter. This is super annoying when I’m typing in scripts or command that’s suppose to go into shell. The reason being is that I’m using Vincent Goulet’s emacs distribution (which already comes with Auctex and ESS). Although his distribution makes life super easy for n00bs like me (Thx Vincent!!!), but he also included extras that I didn’t want.
So this auto-fill mode has been made to turn on by default whenever emacs is editing any text or related files. The lisp line is as such:
(add-hook ‘text-mode-hook ‘turn-on-auto-fill) ; wrap long lines in text mode
The hook, from my understanding, basically means that this change is only applied to text files.
This line is located in the “site-lisp/site-start.el” file located in your GNU emacs folder. Just add a semicolon in front of the line to comment it out and subsequently turn it off. YAY!~
It’s because of its presence, that why when I tried to modify my own .emacs file with the following:
‘(lambda () (auto-fill-mode 1)))
as demonstrated by emacs Init-example file, it still didn’t work. I’m guessing it gets overridden by the site-start.el.
I’ve also seen someone mention seeing some fill-mode changes in Rnw files depending on the location of the cursor. I’ll keep an eye out next time when I’m Sweaving and see if it bugs me or not.
Just FYI~ ^^ Happy coding everyone! (Or attempt at it in my case lol)
PS: If you’re just starting to use Emacs and ESS, GET VINCENT’S EMACS DISTRIBUTION here. Just scroll to the bottom to download. It is absolutely painless to install and makes the already difficult switch from WYSIWYG type of editor to emacs so much easier. I strongly encourage people to give emacs a try (or alternatively Vi, where there’s tons of users advocating it. Many claims it’s even better than emacs. I’ve never used it so I’m woefully unqualified to jump into that hot debate so I’m not even gonna try). Once you get the hang of it, you’ll wish every single program you use works that way!