On 2017-08-02 21:47, Jason wrote: > I am using emacs24 for my text editor with mutt (in a terminal). > How can I set it to automatically wrap the lines at a certain number > of characters?
"M-x auto-fill-mode" will do it in a new buffer, provided you set your fill-column variable. You can do the latter by adding a line to your .emacs, or with the emacs customization feature: M-x customize-option and follow the UI. If you always want this on in mutt compose buffer, you need to use a "hook". This is a complex topic beyond the scope of this forum, but covered thoroughly in your emacs documentation. Also, in this situation (which is also my situation), you should arrange to open these buffers in Message mode, rather than in Fundamental mode. To do this notice the pattern in the temporary file name (in the mode line) and add an item to auto-mode-alist (again, look up in emacs documentation). With this in place you'll get any number of goodies, like highlighted headers and extra key combinations to jump to each header and so on. In fact auto-fill-mode may be already turned on for you. Emacs is a huge and complex beast, but it does tons of useful things. Too bad many people seem to not know about them. -- Please don't Cc: me privately on mailing lists and Usenet, if you also post the followup to the list or newsgroup. Do obvious transformation on domain to reply privately _only_ on Usenet.