Is there a way to open the next unread message in mutt
with a single key? I can move to the next unread with next-new-then-unread
, which is bound to Tab by default. However, if there are no unread messages in the current mailbox, then I'd have to use next-unread-mailbox
instead (unbound by default). This is sub-optimal anyway, because if I have a new message, quit mutt
, then open mutt
again, this won't move me to the mailbox containing the "new" messages. (Presumably the mailbox is not unread any more.)
In addition, both of these move to the next message in index view, and I have to manually open the message in pager view (with Enter). Is there a way to open the next unread message, no matter which mailbox it's in?
I'm using neomutt, so one partial workaround I've found is to use the sidebar commands.
macro index,pager , '<sidebar-next-new><sidebar-open><enter>'
The problem is that this automatically opens the next unread mailbox (from the sidebar). Hence if there are unread messages in the current mailbox and another one, this command will open the message in the other mailbox instead of the current.
<next-unread-mailbox>
regardless of whether there are unread messages in the current mailbox. In this case, it would switch to the other mailbox, and not open the next unread message in the current mailbox. Another problem (as per my question) is that<next-unread-mailbox>
doesn't look for unread/new messages but unread mailboxes. – Sparhawk Dec 19 '17 at 03:04mutt
is not fully scriptable and it's a shame. – Arkadiusz Drabczyk Dec 19 '17 at 14:57O
after leavingmutt
. – Arkadiusz Drabczyk Dec 21 '17 at 14:49