One of the strengths of Emacs is that for most operations there are options. Line wrapping is a case in point. There are several line wrapping methods and which one you use depends on context.
When coding, you may not want any line wrapping. For text, it’s my experience that wrapping at fill-column is usually a good solution unless you need to export the text. In that case, assuming a fixed line length probably won’t work that well: a good line length on a computer screen is going to be a mess on a cell phone. I’ve long since solved that problem by using visual-line-mode for my exported text. It looks good on my screen as I’m writing it and will automatically adjust to whatever screen that it’s displayed on—at least for the devices that commonly export to. A lot of people use it for all their text modes.
Still, there’s a reason we have all those wrapping methods and depending on what you’re doing, you may want to use one or the other. It would be nice to have a way of cycling through the various methods. Sacha Chua to the rescue. She has a nice bit of code that cycles through
- Having everything on one line
- Breaking the line at the
fill-column - Having at most one sentence per line but respecting
fill-column - Having one sentence per line irrespective of
fill-column.
That makes it easy to pick the option that’s best for any particular situation or even to experiment with the options. All the code is in the post and is easy to follow. If you find yourself needing to switch between various line wrapping methods, take a look at her post for some ideas.