Re: Remove unnecessary empty lines in article body. New feature?

Martin Klaiber <[email protected]> Fri, 3 Oct 2008 03:17:31 +0200
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
Dennis Preiser <[email protected]> wrote:

> If this feature is usefull or not depends on the groups you are 
> subscribed to. Some user in non-technically groups insert empty
> lines excessively.

I usually don't have problems with multiple blank lines, but with
missing blank lines between quoted paragraphs. Example:

   >>> sdl ksdl kjsdk ljsd fklj
   >>> slsdff sdfl jsdflkj
   >> slksd flkjs dflkjsdf
   >>> sdlfjk sdlfkj
   >> sdf lkj slkd jflkj sdf
   >> alkj lkja sadfklj
   > slsklsdfolijsdfk

Instead of:

   >>> sdl ksdl kjsdk ljsd fklj
   >>> slsdff sdfl jsdflkj

   >> slksd flkjs dflkjsdf

   >>> sdlfjk sdlfkj

   >> sdf lkj slkd jflkj sdf
   >> alkj lkja sadfklj

   > slsklsdfolijsdfk

These blank lines show the structure of the text much better and
thus make it IMHO much more readable, even when colouring quoted
lines is on.

So, if you add your feature, I would be pleased if you extend it
by an option to add such a blank line between quoted paragraphs.

But I agree with Urs that it might be too much work if you really
want to do it good. Many newsclients or editors quote blank lines,
so you get multiple blank but quoted lines like:

   >>> sdlkfj sldkjf lksjd lkjsd fsdkjf
   >>>
   >>>
   >>>
   >> sdlkj sdlkj sdfklj sdflkj 

I don't know if your patch already considers such cases. Especially
with nonstandard quote-marks like ':' or '|' a good solution might
become tricky. Blanks between the quote-marks make it even more
complicated:

   > :> sdlkfj sldkfj lsdf lkjdsf sdfklj
   > :>
   > :>
   > : sdlkj sdlkj lkjds lkjd sdf

A simple solution might be, to declare a line as blank which does
not contain at least a letter or a number. But then lines with just
a smiley might be deleted (line 4):

   > :> My points are:
   > :> - a...
   > :> - b...
   > :> :-)
   > :>
   > : sdflkj sdflkj sdfkj sdklfj

It is, of course, possible to consider also such cases. I use, for
instance, a regex which tries to discriminate between smilies and
nonstandard quote-marks at the beginning of a line to colour quoted
lines in tin. So, the following line:

   >:sdflkj sdfklj

is recognized as quote-level 2, but these lines:

   >:-)
   >:->
   >:)

are recognized as quote-level 1 as my regex knows the most common
smilies. But it also fails with smilies like ':>'.

To come to an end, I would say: your feature sounds nice. But the
code has to be elaborated so it does not delete lines erroneously
and this could be a lot of work.

Martin