help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 80 char line limit, and we should stop the convention


From: Stefan Monnier
Subject: Re: 80 char line limit, and we should stop the convention
Date: Wed, 28 Mar 2012 19:33:47 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

> I think, something almost the same.  Don't manually break lines.  Write
> paragraphs as one long string, and let the software do the breaking
> at display time.

As a general principle, I largely agree with it (especially for plain
text, where it basically turns LF into a paragraph separator, which is
an important higher-level structural concept otherwise missing).

> That is a fine idea for e-mails, but not so hot for source code.

It might be workable for source code as well, tho clearly the task is
a bit harder: think of newline-terminated comments.
Also, Emacs is not currently very good at auto-filling code.

I actually recently implemented some simple form of auto-fill-mode
support for programming modes whose indentation is based on SMIE.
But it doesn't do the fancy dynamic programming dance required to do
a really good job at automatic code-layout.  Basically it just looks at
each line-break-candidate and chooses the one that moves the
text further to the left.

It shouldn't be too hard to adapt this code so it doesn't actually
introduce newlines, but instead only adds overlays that wrap lines
when displayed.


        Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]