[Pkg-mutt-maintainers] Bug#866366: mutt: my index_format setting is corrupted with newer (neo)mutts

Jonathan Dowland jmtd at debian.org
Thu Jun 29 10:57:28 UTC 2017


The specific issue seems to be the handling of "%> " in $index_format.
The documentation states "right justify the rest of the string and pad with 
character “X”".

With mutt 1.5.x, this works when embedded in the ?M? construct, but with
the versions as indicated in this report, using %> causes breakage, basically
bits from the "else" branch of %?M? are being used in the "if" branch.

The simplest test cases I can come up with are as follows. This works, using
%| (pad to the end of the line with character “X”). The ']' character is 
effectively ignored because the line is already full.

	set index_format="%?M?collapsed%|.]&expanded?"

You will see something like this when looking at a mailbox with a mixture of 
collapsed and expanded threads (best way is probably to have some 
single-message threads and then set collapse all). Assuming a 70 char terminal 
width, to be nice with mail wrapping):

expanded
collapsed.............................................................
collapsed.............................................................
expanded
expanded

If you replace %| with %>, what should happen is the rest of the string
*within* the "if"/collapsed branch of the expression is right-justified,
and padded with '.'. So, the ']' should appear on the right side of the
line. This is what old mutt (1.5.x) does:

expanded
collapsed............................................................]
collapsed............................................................]
expanded
expanded
expanded

And this is what current neomutt does (note that the expansion character
'.' is lost too):

.]&expanded>
collapsed.]&expanded>
collapsed.]&expanded>
.]&expanded>
.]&expanded>
.]&expanded>

So, the  $index_format parser is eating up the stuff for the ?M? in error.

-- 

Jonathan Dowland



More information about the Pkg-mutt-maintainers mailing list