This is a topic that has often bothered me when collaborating with people on writing latex.
I use Emacs with auto-fill-mode and Meta-Q to fill paragraphs. This usually works out ok in my own files because usually a re-fill of existing text only affects a few lines.
When other people get involved, diffs and merges are ruined, as the article says.
But the article's solution sounds like a lot of work. Do I have to manually break lines that get longer than 80 characters (or whatever my limit is)? Am I supposed to turn soft word wrap on?
I think the right solution is to rebind Meta-Q in Emacs to some magic command that refuses to reflow any text which is reported as unmodified by the version control, but does reflow new/modified text according to the article's rules, and also imposes an 80-character limit.
I would just use soft word wrap - well, I always have soft wrap on, but especially in this case it seems simplest to me to let long sentences/clauses soft wrap and retain the mapping from line to semantic unit.
> Do I have to manually break lines that get longer than 80 characters (or whatever my limit is)? Am I supposed to turn soft word wrap on?
In most situations, there should be some sort of semantic break in your sentences every 80 characters or less. (It may not be demarcated with a comma.) If there isn't, you may want to consider reworking those sentences for clarity.
Yes. When writing LaTeX, I put line breaks in after phrases and clauses, as well as at every sentence end. I'm following exactly Kernighan's advice from old nroff documentation.
As a result, my text is very ragged right. I don't even notice it because I'm concentrating on meaning, not form.
Or you could just set your line wrap margin pretty low, e.g. 50 or 60 characters, and then when you edit don't re-wrap. Requires less thinking about where to break lines, while still keeping most changes localized to a line and thus cleaner diffs.
I use Emacs with auto-fill-mode and Meta-Q to fill paragraphs. This usually works out ok in my own files because usually a re-fill of existing text only affects a few lines.
When other people get involved, diffs and merges are ruined, as the article says.
But the article's solution sounds like a lot of work. Do I have to manually break lines that get longer than 80 characters (or whatever my limit is)? Am I supposed to turn soft word wrap on?
I think the right solution is to rebind Meta-Q in Emacs to some magic command that refuses to reflow any text which is reported as unmodified by the version control, but does reflow new/modified text according to the article's rules, and also imposes an 80-character limit.
Edit [http://stackoverflow.com/questions/539984/how-do-i-get-emacs...] has a lot of solutions for getting Emacs to fill according to the article's suggestions.