Re: [PATCH] Add $weed_unfold option.
"Kevin J. McCarthy" <[email protected]>
| Newsgroups | gmane.mail.mutt.devel |
|---|---|
| Message-ID | <aaEIxizF3imj3SIT@qinghai> |
On Thu, Feb 26, 2026 at 05:09:38PM +0100, Rene Kita wrote:
>On Thu, Feb 26, 2026 at 12:19:48PM +0800, Kevin J. McCarthy wrote:
>> This option, when unset, modifies the display of email headers when
>> $weed is enabled.
>>
>> The default behavior is to unfold headers when $weed is set, and to
>> leave them folded when $weed is unset (in effect, displaying them as
>> they appear in the original email, subject to screen width wrapping).
>>
>> When $weed_unfold is unset and $weed is set, the headers will be
>> weeded, but will not be unfolded: displaying as they appear in the
>> original email.
>>
>> The option could be useful for those who 'unignore' long headers, such
>> as from Spam Assassin, that are formatted to be more readable in the
>> original email, but become unreadable when unfolded/refolded to screen
>> width.
>
>This left me a bit confused, but maybe it's just me. Just to clarify:
>$weed_unfold unset is the new behaviour while setting $weed_unfold is
>the old default? If so, wouldn't it make more sense to use $weed_fold?
To be clear, the default behavior is unchanged by this patch.
But I agree it is a bit confusing. The *sending* MUA (and hops that add
headers) fold the headers to be within the 72 char limit.
Currently, with $weed set (the default) Mutt will unfold those
headers. So, with an exaggeratedly small fold width for example
purposes, a folded subject line such as
Subject: This is the
subject line
will be displayed as
Subject: This is the subject line
When you toggle off weed via 'h' <display-toggle-weed>', the subject
will not be unfolded. It will be shown as it is in the original
(subject to folding by your display width). So you will then see:
Subject: This is the
subject line
along with all the headers in the email.
So this new option by default preserves that behavior. $weed_unfold is
set by default, and so when $weed is on, the headers will be unfolded as
before.
If you put 'unset weed_unfold' in your muttrc, then the subject and
other headers you've unignored will be displayed without the unfolding:
Subject: This is the
subject line
>Also, unfolding in that case means that a nicely formatted header, a
>header that goes over multiple lines to be read by humans, is 'unfolded'
>to be a single line header, right?
The ticket creator was not happy because their SpamAssasin headers were
"nicely" formatted, and Mutt was unfolding them and making them less
readable. But that's not necessarily the case for all headers.
If you still find the option name confusing, I could invert it, to
something like $weed_leave_folded, default unset. But the option
doesn't haven't anything to do with "folding".
I hope that makes it clearer! :-)
--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmmhCMYACgkQre92hIAx a9qA7A//Ygr/m7lz6d+InOHWj+pGDBUWqfdFSwQxCTxSqMJQp22BbcMj59uRKytW C1OylJD4prwtmO1uVHGw6iqCcUaqgcNdXPv8KxnqYb9Lyp/bvolsNgmdhohqEIOg 0l6Fd4EuAWZs68MqZj1vDNibAMRLJx6kOYbgmOrOYGCd+Q1WCCKo0nUSgL/E9vlQ LhGys9hYPEzOOeV3cMeEMHcvQTfDietWr9Xl5uOP2lVjgjFnIkGKTXv8Gy9G4cIa tF1lcqokPMPdVH/uyLHQyPtarHPdV/InP4U4jGDSJxxT8S7Xbi5BJAJX2199FptJ colM+uVPwKst4rnIZLJUTF4hC5JpYvRWcPAO9aVSdjGSQ9AU4ibdhSuF6jgY1F2+ 54TssM/D9elYMCgfBNM8f1WC7k5HSflnvABSK1C9Z6gpqbeVY/HAC05IhAm8hk3L SDMaZFFNdsL+4OLWzfGjOievT/EsoXuGYFK7w/30yKp4q7VeQ8Hdkflvorr5edLi D4kv3slF1IOP4mcy+bj+NDjHnHU+ty5LJjU/OtJLp8v4jCN8Rh+JAHmlTz0j2ETg zq5QkMw3rCYdqk894vlptn0Bh6tv1qt5tLVjaZRF1fvm1Ft1IhcJTF45MMPhARXW +oUPB8ErHjS9NsP+XA59j9FGYaC15U/OX4d2PD4NeVfzUKNSeRg= =jGSi -----END PGP SIGNATURE-----