[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] What am I doing wrong: refile -retainsequences, when s
From: |
David Levine |
Subject: |
Re: [Nmh-workers] What am I doing wrong: refile -retainsequences, when src and destination are the sane directory |
Date: |
Sat, 02 Aug 2014 22:41:25 -0400 |
Ken wrote:
> It looks like the only true solution would be to have refile recognize
> the special case where the source and destination folder are the same
> and use the same structure for both.
Agreed, and I just committed that. Let me explain what I did so
that it can be readily reviewed, because this change affects the
operation of refile(1) even without -retainsequences.
All of the changes are in uip/refile.c. There are two
significant changes:
1) If the source and destination folder are the same, instead of
calling folder_read() on both, just copy the result of
folder_read() on the source folder to the destination
folder's folders[] entry (fp->f_mp in the loop). Simple
enough.
2) If the source and destination folder are the same, don't
indicate that the new message is selected so that 1)
folder_delmsgs() doesn't delete it later and 2) it is not
reflected in mp->hghsel, and therefore won't be assigned to
be the current message.
This happens after the message has been copied to its
destination, so selecting the message would only affect
whether or not it's to be deleted and removed from sequences.
David
- Re: [Nmh-workers] What am I doing wrong: refile -retainsequences, when src and destination are the sane directory,
David Levine <=