When I'm writing in
org-mode I want it to automatically handle the creation of new lines similar to MS Word.
Can anyone recommend an
.emacs config that will only apply to
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
This will work:
(add-hook 'org-mode-hook '(lambda () (setq fill-column 80))) (add-hook 'org-mode-hook 'auto-fill-mode)
It enables a minor mode called
auto-fill-mode that does exactly what you asked and sets the column where the line break happens to
80 (only for org-mode!).
To be consistent with Emacs Manual you could use
(add-hook 'org-mode-hook '(lambda () (setq fill-column 80))) (add-hook 'org-mode-hook 'turn-on-auto-fill)
Even though I'm not sure what is the difference between both of them.