On Wed, Aug 19, 2015 at 11:15:37AM +0200, Michal Hocko wrote:
> Package: mutt-patched
> Version: 1.5.23-3
> Severity: normal
> 
> Hi,
> emails which are marked New and saved to a different mailbox are
> sometimes marked as read. I cannot seem to reproduce this all the time,
> though. I've tried to debug mutt_save_message and here is what I saw
> (gdb) n
> 758         mutt_default_save (buf, sizeof (buf), h);

OK, nailed it.
391           if ((mutt_pattern_exec (hook->pattern, 0, ctx, hdr) > 0) ^ 
hook->rx.not)
5: *hook = {type = 16, rx = {pattern = 0x7e5c50 "~h 'worktime'", rx = 0x0, not 
= 0}, command = 0x7e39b0 "imaps://XYZ", 
  pattern = 0x7e5510, next = 0x7e4920}
4: hook = (HOOK *) 0x7e4460
3: *hook->pattern = {op = 36, not = 0, alladdr = 0, stringmatch = 0, groupmatch 
= 0, ign_case = 0, min = 0, max = 0, next = 0x0, child = 0x0, p = {
    rx = 0x7e5540, g = 0x7e5540, str = 0x7e5540 "\300A~"}}
2: hdr->read = 0
(gdb) 
387         if(!hook->command)
5: *hook = {type = 16, rx = {pattern = 0x7e50f0 "~C XYZ", rx = 0x0, not = 0}, 
  command = 0x7e5460 "imaps://XYZ", pattern = 0x7e4020, next = 0x7e5d30}
4: hook = (HOOK *) 0x7e4920
3: *hook->pattern = {op = 44, not = 0, alladdr = 0, stringmatch = 0, groupmatch 
= 0, ign_case = 0, min = 0, max = 0, next = 0x0, child = 0x0, p = {
    rx = 0x7e49b0, g = 0x7e49b0, str = 0x7e49b0 "\020K~"}}
2: hdr->read = 1

So it seems that ~h hook pattern has changed the header. Emails stay
marked New after I removed the rule but ss this expected? Why ~C or ~f
which need to examine the header as well do not touch the state?
-- 
Michal Hocko

Reply via email to