So I have the following problem. I use emacs (specifically orgmode, but my problem applies to emacs in general) quite a lot for writing longer texts (In the long term I even plan on writing scientific papers with emacs). However, one of the problems I have is line formatting. As you probably all know, emacs does not really have default “automatic line breaks” as you know them from rich text editors like LibreOffice. Instead emacs then just moves the entire window you see to the right, if a single line gets too long. Since this is awful for editing I started to add line breaks manually, however the problem is, that you then have to manually re-do the entire formatting if you decide to change the structure of one ore more sentences/lines, which is kind of annoying. The next problem is, that it may look good on your screen with the manual linebreaks, but the formatting then often looks bad when viewed on smaller screens.
One solution I saw is, that if a line gets to long, that emacs then just puts the rest of the line into a new line on the screen, without inserting a line break. How can I enable this behaviour in my emacs config?
I also found out about Auto Fill mode, however I kind of dont like, that it inserts a new linebreak relatively fast (my screen is wide, so I want to use it) and the problem with exporting still stands.
Anyone got any good workarounds that might be helpful?


You probably want
visual-line-mode. You can flip it on withM-xand thenvisual-line-modeto try it out.C-h fforvisual-line-mode:visual-line-mode docs
The info node in question
I have something like this in my
init.el:So that when I’m in
text-mode,visual-line-modealso comes on automatically by default.It doesn’t do so in things like programming modes, where one doesn’t want that sort of thing.
(I also turn on checking for misspelled words in
text-mode, and highlighting of them, which is whatflyspell-modeis for.)Thanks, thats exactly what I was searching for.