Re: [PATCH] Add $weed_unfold option.

Rene Kita <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
On Fri, Feb 27, 2026 at 11:00:22AM +0800, Kevin J. McCarthy wrote:
> 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!  :-)

Thanks for the explanation, it's clear to me now. And in the given
context the name makes sense.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.