read thread and go to next unread (from pager)
I would like to make the following index macro work in the pager as well: read-threadprevious-undeletednext-new-then-unread This works just fine in the index, but fails in the pager if there exists an unread message directly after the current thread to be read, because previous-undeleted goes back one message and thereby marks the displayed (unread) message as read and next-new-then-unread then skips the message. If I remove previous-undeleted the problem persists: the message after the read thread is skipped over directly with next-new-then-unread. What I need is something like next-new-if-current-is-unread that executes directly after read-thread. In the IRC channel, micromar pointed me to tag-prefix-cond, which seems that it could work if I could query the ~N flag of the current message. However, I failed to put together a working solution. Any guidance would be much appreciated. Matthias
Re: read thread and go to next unread (from pager)
* On Sun, Jun 21, 2015 06:38PM +0200 I (tatg...@gmail.com) muttered: * On Sun, Jun 21, 2015 03:59PM +0200 Matthias Vallentin (vallen...@icir.org) muttered: macro index ,foo read-threadprevious-undeletednext-new-then-unread macro pager ,foo2 \ exitread-threadprevious-undeletednext-new-then-unreaddisplay-message It's by far easier, no need for previous-undeleted if resolve is unset. macro index,pager ,foo 'enter-command set my_resolve=$resolveenter\ enter-command unset resolveenterread-threadnext-new-then-unread\ enter-command set resolve=$my_resolveenter' read thread and go to next unread message (Tested) :) HTH, Michael -- PGP-Key-ID: EEE7D043 Jabber: in...@jabber.de
Re: read thread and go to next unread (from pager)
* On Sun, Jun 21, 2015 03:59PM +0200 Matthias Vallentin (vallen...@icir.org) muttered: I would like to make the following index macro work in the pager as well: read-threadprevious-undeletednext-new-then-unread fails in the pager if there exists an unread message directly after the current thread to be read, because previous-undeleted goes back one message and thereby marks the displayed (unread) message as read and next-new-then-unread then skips the message. So why don't you exit the pager first? Something like macro index ,foo read-threadprevious-undeletednext-new-then-unread macro pager ,foo2 \ exitread-threadprevious-undeletednext-new-then-unreaddisplay-message might work? (untested) Michael -- PGP-Key-ID: EEE7D043 Jabber: in...@jabber.de
Re: read thread and go to next unread (from pager)
* On Sun, Jun 21, 2015 06:47PM +0200 I (tatg...@gmail.com) muttered: * On Sun, Jun 21, 2015 06:38PM +0200 I (tatg...@gmail.com) muttered: macro pager ,foo2 \ exitread-threadprevious-undeletednext-new-then-unreaddisplay-message macro index,pager ,foo 'enter-command set my_resolve=$resolveenter\ enter-command unset resolveenterread-threadnext-new-then-unread\ enter-command set resolve=$my_resolveenter' read thread and go to next unread message Talking to myself again, I should read my messages more carefully before sending... ;p macro index,pager ,foo 'enter-command set my_resolve=$resolveenter\ enter-command unset resolveenterread-threadnext-new-then-unread\ enter-command set resolve=$my_resolveenterdisplay-message'\ read thread and display next unread message Now then, I did try to make no mistake this time. Michael -- PGP-Key-ID: EEE7D043 Jabber: in...@jabber.de
Re: read thread and go to next unread (from pager)
macro index,pager ,foo 'enter-command set my_resolve=$resolveenter\ enter-command unset resolveenterread-threadnext-new-then-unread\ enter-command set resolve=$my_resolveenterdisplay-message'\ read thread and display next unread message Now then, I did try to make no mistake this time. Indeed, it works like a charm. (Clever use of resolve, BTW!) Matthias