sidebar_format Not Showing Number of Unread Emails

Michael Klemm michael at dontknow.de
Tue Jan 4 12:14:00 UTC 2022


Hi Kevin,

On Mon, Jan 03, 2022 at 10:34:18AM -0800, Kevin J. McCarthy wrote:
> On Mon, Jan 03, 2022 at 12:40:17PM +0100, Michael Klemm wrote:
> > I have a small issue with sidebar_format that I cannot really sort out.
> > If I set this sidebar_format
> > 
> > 	set sidebar_format = '%B%* %n'
> > 	
> > Mutt highlights the folder with unread messages, but does not show the
> > number, but no count at all:
> 
> To make sure I'm understanding you, %n will display 'N' when the mailbox has
> new mail, not a count.
> 
> However, note that $mail_check_recent can affect this for mailboxes you have
> already visited.  Also note that 'unread' isn't the same as 'new'. For
> example, 'old' messages are unread but not new.
> 
> > I cannot make it work to only show the number for the mailboxes count
> > > 0.  I have also tried
> > 
> > 	set sidebar_format = '%B%* %?N%N'
> 
> Try:   set sidebar_format = "%B%* %?N?%N?"

That solved the issue!  I guess I was misunderstanding the way the "%?"
part worked.  Thanks for helping me out on this one!

> http://www.mutt.org/doc/manual/#formatstrings-conditionals gives a review of
> the syntax.

Thanks for the pointer!


Kind regards,
        -michael



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20220104/fc31f0d0/attachment.asc>


More information about the Mutt-users mailing list