This is a clumsy folder-hook I did years ago but don't use. It might make life
easier? (it can definitely be improved - \n should be <enter> and pattern of
'.' should be ~T I think?). I'm quoting direct from my .muttrc where I keep
notes of tricks, even if I don't use them)

# a trick to make all unread messages appear as NEW when entering a folder.
# folder-hook . 'push 
"<tag-pattern>~U\n<tag-prefix-cond><set-flag>N<end-cond><untag-pattern>.\n<end><next-new>"'

FWIW, I also find this dovecot behaviour frustrating - mainly because I use an
optimised `find` to discover 'new' directories with files in them as a way to
count mailboxes with recent deliveries (and report this in my tmux statusbar.
The count takes but a split second). I don't think such an efficient solution
would be possible for 'old' messages.

.../Nemo



Quoting Petr Baudis from 26 Sep (a Monday in 2016) at 1655 hours...
>   Hi!
> 
>   mutt is showing messages in maildir that are unread but in cur/ as
> "old", is there a way to make the messages (in general all unread
> messages) always show as "new" instead? I'm not interested in the
> distinction at all...
> 
> 
>   I've just set up Dovecot imap on a maildir i'm also reading with mutt
> locally, and Dovecot follows the maildir spec which says that MUA should
> move mails from new/ to cur/ right away, and that is making mutt show
> the messages as old instead of new. Note that mutt's $mark_old (which
> I have disabled) doesn't affect this as it says only what mutt does when
> *saving* messages.
> 
>   (N.B. the same thing is actually also happenning with mailboxes accessed
> by Dovecot, but I haven't looked into exactly why in that case.)
> 
>   I'm open to suggestion about imap servers that don't do this and play
> well with local mutt MUA too! (Even though I can't say Dovecot is doing
> anything *wrong* per se.)
> 
> 
>   I'm also thinking about just living with mutt's O/N distinction;
> I can filter on ~U rather than ~N and tab works fine, but the only issue
> (important to me) is that there is a <toggle-new> command, but not
> <toggle-unread>, so hitting "N" on an O-mail will not mark it read,
> unlike on N-mails.  (There's also <set-flag> and <clear-flag>, but not
> <toggle-flag>.)  If I were to whip up a patch on this, what do you think
> the best approach would be?
> 
>   Thanks,
> 
> -- 
>                               Petr Baudis
>       Never!  Run before you walk! Fly before you crawl!
>       Keep moving forward!  Because if we fail, I'd rather fail
>       really hugely.  All or nothing!  -- Moist Von Lipwig
> 

-- 
  ----------------------------------------- -----------------------------
                                                    earth native

Reply via email to