nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] refile and moving sequences with messages

2013-03-14 21:13:36
Kevin wrote:

What do you think about this functionality being added natively to
refile?  Possibly via a command line switch?  -retain-sequences or
something.

Done, here's the interesting part:

/*
 * Copy sequence information for a refiled message to its
 * new folder(s).  Skip the cur sequence.
 */
static void
copy_seqs (struct msgs *oldmp, int oldmsgnum, struct msgs *newmp,
           int newmsgnum)
{
    char **seq;
    int seqnum;

    for (seq = oldmp->msgattrs, seqnum = 0; *seq; ++seq, ++seqnum) {
        if (strcmp (current, *seq)) {
            assert (seqnum == seq_getnum (oldmp, *seq));
            if (in_sequence (oldmp, seqnum, oldmsgnum)) {
                seq_addmsg (newmp, *seq, newmsgnum,
                            is_seq_private (oldmp, seqnum) ? 0 : 1, 0);
            }
        }
    }
}

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>