<<< Date Index >>>     <<< Thread Index >>>

Re: wrapmargin is a bad way to solve `smart' wrapping



On Sat, Oct 04, 2003 at 02:00:31AM +0200, Han Boetes wrote:
( clipped for brevity )
>     wrapmargin
>     Controls the margin left at the right side of the terminal when
>     mutt's pager does smart wrapping.
> Well that's ok if you never change the size of your terminal. But I do
> change the size of my terms occasionally. It would make much more sense
> to me if there was a variable named:
>     wraplength
> Looks like a much smarter way to do things. Too bad I'm so bad at
> C. But perhaps someone here thinks it's a good idea and wants to
> implement it. Please let me know. I'd be happy to test it.

Well, wrapmargin actually tells mutt how much space to leave at the
right-hand side.  That is, if you set wrapmargin=5, then all lines
will be wrapped at 5 spaces before the edge of the terminal.  If your
terminal is 80 wide (a well-respected standard) then it will wrap at
75 characters.  If your terminal is 135 wide, it will wrap at 130.

So, unless you have egregiously long lines that you want wrapped at a
specific length (thus leaving potentially large gaps of whitespace on
the right-hand side of your terminal) I think wrapmargin is actually
what you want after all.  On the other hand, implementing wraplength
would probably be nigh-trivial.  If I can solve it in 30min or less,
I'll give you a patch later that does it.

Cheers,
 Allister