There’s only one point in my configuration where I use auto-fill-mode
, and that’s magit
’s COMMIT_EDITMSG
buffer. This allows me to just write text and have magit handle the (recommended) hard breaks automatically.
If I were to write text-only mails with Emacs, I would use auto-fill-mode
there too, just to ensure that my text follows the RFC.
And that’s exactly where auto-fill-mode
shines: situations where only a specific line length is valid.
I disagree (unless you’re talking about commit messages). Let’s say you have the following text with hard line breaks:
I’m just curious if people are using auto-fill-mode, and if so, what
advantages it has. Seems like it can be helpful to have hard line
breaks when you’re using version control.
Now we want to add a word:
I’m just curious if people are using auto-fill-mode, and if so, what
convincing advantages it has. Seems like it can be helpful to have
hard line breaks when you’re using version control.
This yields the following diff:
I’m just curious if people are using auto-fill-mode, and if so, what
-advantages it has. Seems like it can be helpful to have hard line
-breaks when you’re using version control.
\ No newline at end of file
+convincing advantages it has. Seems like it can be helpful to have
+hard line breaks when you’re using version control.
A change in a single line affected two. Even worse, a single word moved all words in the following lines. That makes it hard to see the actual changes, because content and representation suddenly are mixed.
In many markup languages, a single newline does not introduce a new paragraph/newline. So if we think about that being Markdown or LaTeX, the following text that enters a non-rendering newline after periods would render the same but have a clear diff:
I’m just curious if people are using auto-fill-mode, and if so, what advantages it has.
Seems like it can be helpful to have hard line breaks when you’re using version control.
I’m just curious if people are using auto-fill-mode, and if so, what convincing advantages it has.
Seems like it can be helpful to have hard line breaks when you’re using version control.
This yields a single line diff.
-I’m just curious if people are using auto-fill-mode, and if so, what advantages it has.
+I’m just curious if people are using auto-fill-mode, and if so, what convincing advantages it has.
Seems like it can be helpful to have hard line breaks when you’re using version control.
Note that the unrelated sentence isn’t affected by the change. All of this of course only holds if you can use free-flowing text—if you have to work on the resulting text and said text needs to have a fixed with, then that changes the whole scenario, but otherwise I’d say: drop auto-fill-mode
unless actually required.