nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Synchronization Problem


From: Ken Hornstein
Subject: Re: Synchronization Problem
Date: Fri, 24 Jul 2020 13:07:21 -0400

>fetchmail runs off a deamon and deposits emails which are in fine nmh format
>but do not have a numeric names. So I run this script:
>[...]
>But after the scan is complete and before I do the rmm, the script might
>have put a new message in +inbox, which rmm would remove.

There aren't _wonderful_ solutions, because this is a higher-level problem;
other programs can change the state of your inbox between commands.
Unless you want to do something like Kevin Cosgrove suggested, this is
fundamental to your design.  You could do some higher-level locking
where you prevent your script from running while you read your inbox.

It does occur to me you could use something like the previous-sequence
to preserve the selected message between "scan" and "rmm".  I don't know
if the refile command modifies the previous-sequence in inbox, but if it
does not you could do:

scan +inbox
rmm prevseq:last

(I'd want to test that thoroughly before I committed to using it, though).

--Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]