[Top][All Lists]

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

Re: [Nmh-workers] new command lacks lock

From: Robert Elz
Subject: Re: [Nmh-workers] new command lacks lock
Date: Thu, 17 Oct 2013 18:59:15 +0700

    Date:        Thu, 17 Oct 2013 11:37:53 +0100
    From:        Ralph Corderoy <address@hidden>
    Message-ID:  <address@hidden>

  | 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

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).


reply via email to

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