Discussion:
Can mutt mark a message as read right when opening it?
Martin
2018-06-13 19:14:51 UTC
Permalink
Hello all,

I'm using mutt 1.10.0 on L/Xubuntu 16.04 together with i3wm. I have a small script thats show me the number of unread
emails.

The gist of it is: find /home/martin/mail -path "*/new/*" | wc -l

In my muttrc I have:

macro index,pager <Tab> '<sync-mailbox><next-unread-mailbox>!pkill -RTMIN+4 i3blocks<enter>'

So when I open a new email and hit tab it will refresh the unread counter in my tray bar right away. That works well.
Just if I don't hit Tab after reading or rather opening the last/only unread email, the counter will remain as 1. I
often forget to hit Tab there.

Any idea how to solve it better? I guess if I could configure mutt to mark a message as read right when I open it, it
would solve it. Yes, this is a very lazy first world problem. :(

Best regards,
Martin
Francesco Ariis
2018-06-13 20:15:10 UTC
Permalink
Hello Martin,
Post by Martin
Any idea how to solve it better? I guess if I could configure mutt to
mark a message as read right when I open it, it
would solve it. Yes, this is a very lazy first world problem. :(
Can't you make, say, 'o' (open message) a macro instead of a binding it
to a single command?
Martin
2018-06-20 09:25:21 UTC
Permalink
Forgot to send these messages of my thread to the list also:


Hello Francesco,
Hey Martin,
sorry, after rereading your message I feel I gave a completely stupid
suggestion.
To make it clear: say you have 5 new messages, you will read all of them
and then press tab once, right?
With 5 messages, I would hit Tab 5-6 times to jump from where ever my
cursor is at the beginning to the 1st, 2nd, 3rd,
4th, 5th and then a final time to sync/mark the last one as read. So I
can do everything with one key :)

Best regards,
Martin


Hello Francesco,

thank you for your reply.
Hm, I don't quite understand what you mean, sorry.
I already have a macro just on Tab not on "o". What do you mean by a
"single command"?
Using Tab is convenient for me, as I can skip through my mostly short
emails until all are "read" and then go back to
whatever I have been doing before.

Best regards,
Martin
Hello Martin,
Post by Martin
Any idea how to solve it better? I guess if I could configure mutt to
mark a message as read right when I open it, it
would solve it. Yes, this is a very lazy first world problem. :(
Can't you make, say, 'o' (open message) a macro instead of a binding it
to a single command?
Continue reading on narkive:
Loading...