I'm using Emacs (24.4+1-5) and org mode for writing prose, which means that I need some mechanism for line wrapping that just works, and preferably the same way each time. At the moment I'm using visual-line-mode with fill-column set to 80. However, opening an old text file (having ascertained that org-mode, visual-line-mode, and the fill-column parameter are all set) and entering some additional text, the lines easily exceed 80 characters and have to be re-wrapped manually using M-q. What am I not getting here?
Here's my .emacs:
(setq sentence-end-double-space nil) (add-hook 'text-mode-hook 'visual-line-mode) (menu-bar-mode -1) (defun margins () (setq left-margin-width 20) (setq right-margin-width 20)) (add-hook 'text-mode-hook 'margins) (setq-default fill-column 80)
visual-line-modeto do its soft-wrapping atfill-column? It doesn't.fill-columnis for filling and nothing else. AFAIKvisual-line-modealways soft-wraps at the width of the window. Filling text adds/removes newline characters.visual-line-modedoes not modify the text at all. The two features are quite different.auto-fill-modeis possibly what you're looking for? (I would suggest experimenting with it withvisual-line-modeoff.)