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

Urs Janßen <[email protected]> Thu, 2 Oct 2008 12:36:59 +0200
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
On Thu, Oct 02, 2008 at 12:17:27PM +0200, Dennis Preiser wrote:
> So I patched my tin to behave like this:
>
> -remove leading empty lines
> -replace multiple empty lines with one empty line (when not in verbatim 
> blocks)
> -remove trailing empty lines (keep one if an attachement follows)
>
> Empty lines in this context are lines with a length of 1 (line[0] ==  
> '\n'). For details see the patch attached.
>
> If anyone else is interested in this feature I would make it a 'M'enu  
> option (for instance: "Trim article body", default OFF).

If you add that option (dunno if it's a usefull feature) I would suggest to
not just make it a on/off option but allow a finer control, e.g.:

0 = off
1 = skip leading empty
2 = skip tailing empty
3 = skip leading and tailing empty
4 = compact multiple empty between textblocks
5 = compact multiple empty between textblocks && skip leading empty
6 = compact multiple empty between textblocks && skip tailing empty
7 = all

and maybe a second option which controls in which body-parts the setting
should be used:

0 = none
1 = body without signature (without verbatim blocks)
2 = signature only (without verbatim blocks)
3 = body & signature (without verbatim blocks)

but that might be overkill.

urs
-- 
"Only whimps use tape backup: _real_ men just upload their important stuff
 on ftp, and let the rest of the world mirror it ;)" - Linus