nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] new command lacks lock

2013-10-17 07:27:24
    Date:        Thu, 17 Oct 2013 11:37:53 +0100
    From:        Ralph Corderoy <ralph(_at_)inputplus(_dot_)co(_dot_)uk>
    Message-ID:  
<20131017103753(_dot_)DCAEA29977(_at_)orac(_dot_)inputplus(_dot_)co(_dot_)uk>

  | What if the `rm 2' was temporary with the script about to re-instate it
  | after deleting 4 from the sequence?

And what if some completely different file was moved in and called '2'
before the mark -d ?   That one would remain in the sequence, though it
has no business being there really ... I mean consider a more realistic
case where the sequence contains all messages about some topic, or from
some user, or that need an urgent reply ... the new file is just some
message that happens to have been given the same name as an old one,it doesn't 
necessarily have any of the same properties, and so should be removed
from the sequence, but mark wouldn't do that.

Of course, nor could it - aside from remembering digests of every message
and comparing them all to see if any messages happen to have been changed.

I think the moral is that if you go about playing with the MH datastore
without involving MH commands, then it is your responsibility to make sure
everything remains consistent - if the modified message should not be a
member of some or all sequences, then you need to delete it (whether or not
it might just go away by itself in some circumstances) and if you want a
modified (modified outside MH processes) message to remain a part of some
sequence, you should make sure to put it there (even if you might be hoping
that it would have been there already) after the external modifications are
finished.

I'm not sure if we have it or not yet, but the one thing that MH could do
that would help with all of this, would be to provide a command (or option)
to provide info about messages - a mstat command or something, that would
list for a message, all its properties in some nice (to use, I don't care
about looking at) format - in this case, the sequences a message is a
member of would be useful, then after manipulating your message 2, you could
add it to any of those sequences it should remain a member of (just in case
MH accidentally deleted it while the message was not technically present) or
delete it from any that are no longer relevant.

But other (script useful) info would be good to know too (the message's
encoding, perhaps body size, number of annotations ...  almost anything
that might be useful for a script to use to manipulate messages).

kre


_______________________________________________
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>