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

Re: For 1.5.9: soft fill [patch-1.5.8.dgc.softfill.3]



Hi Dave!

 On Sunday, March 6, 2005 at 7:11:35 PM -0600, David Champion wrote:

> The softfill patch provides a "%*X" expando, similar to the existing
> "%>X" and %|X". Like "%>X", it inserts padding to push a line of text
> all the way to the right. Unlike "%>X", it gives fill precedence to
> the right-hand side, not to the left.

    Clear, simple, and usefull. Thanks! I'm happy to have retriggered
interest about it! About usefullness, see on mutt-users msgids
<20050222162513.GA25614@xxxxxxxxx> and especially
<20050302220609.GA14092@xxxxxxxxx> (note they talk about old v2 %=XY
syntax).


> Now the entire LHS is held in reserve. It's debatable whether this is
> better, but it's definitely simpler.

    I agree, but let's pose the debate: Old v2 %=XY gives right-hand
priority over *one* given Y left field, while new v3 %*X gives right
priority over everything at left. Important left-hand infos may be
hidden on narrow screen, which imposes carefull choice of fields and
safe right width limitations. Compared v2 and v3 behaviours have each
pros and cons. Ok: Simpler v3 wins.


> the patch also modifies the basic expando modifier code

    BTW how can you truncate beginning of a fixed width field? Like a
long /home/a/alain/long/path/filename.ext, displayed on 20 chars as
"ng/path/filename.ext"?


    Bug: With v3 and $index_format="%s%* [%F]" on a 50 columns term I
get correct:

| Repeated crashes on x86-64 [Mads Martin Jørgensen]
| |->                             [Thomas Glanzmann]
| | `->                      [Mads Martin Jørgensen]
| `->                                [Brendan Cully]
|   `->                      [Mads Martin Jørgensen]

    But on 15 columns term, normally truncated beginning of name comes
back overwriting end of line:

| rtin Jø[Mads Ma
| omas Glanzma[Th
| rtin Jø[Mads Ma
| [Brendan Cully]
| rtin Jø[Mads Ma


    And while stress testing that effect, doing many terminal resizes, I
also had at random in attachment menu black screens (staying black after
^L), and even one segfault:

| #0  menu_redraw (menu=0x80da218) at menu.c:841
| 841       if (menu->dialog)
| (gdb) print menu
| $1 = (MUTTMENU *) 0x616c702f
| (gdb) print menu->dialog
| Cannot access memory at address 0x616c7057.


    If this patch is commited, may I suggest default value of
$attach_format gets changed, old "%.40d%> " sequence replaced by
"%d%* ". This both removes the annoying fixed 40 chars limit, and
ensures right-hand [type infos] are never pushed out of screen.

| set attach_format="%u%D%I %t%4n %T%d%* [%.7m/%.10M, %.6e%?C?, %C?, %s] "


Bye!    Alain.
-- 
Give your computer's unused idle processor cycles to a scientific goal:
The Folding@home project at <URL:http://folding.stanford.edu/>.