<<< Date Index >>>     <<< Thread Index >>>

Re: ANNOUNCE: maildir header cachefor current development cvs (WAS: Re: [OT] I'm Just A Programmer and Re: ANNOUNCE: maildir header cachefor current development cvs))



On Sun, Feb 08, 2004 at 04:44:35PM EST, Thomas Glanzmann wrote:

> > Also, I think what I said in my previous mail isn't 100% correct: if you
> > look at a new message, it should be moved from the new/ subdir to the cur/
> > subdir, and if you delete it, its filename is changed, IIRC ... in both
> > of the above cases, mtimes of the new/ and cur/ should be updated, and
> > you may want to argue that no other changes really matter 99% of the time.
> > (For the other 1% of the time (i.e., for functions like edit-type, etc.),
> > you can force an immediate cache invalidation before exiting the function
> > in question.)
> 
> The problem is that I care about the 1% see [1]. Especially in the case
> of an external modification but we could do it configurable. My patch
> doesn't invalidate the cache on edit (maybe it does, but not explicit),
> deletion or change flags.

<quote from="[1]">
Afte editing files in a maildir's cur or new subdir mutt does not notice
the change and does not update hcache.db.  Instead the messages are
displayed with a currupted message body.
</quote>

Why don't you just make a special file in new/ and in cur/ and touch
it every time you touch a message?  That way, Mutt need only stat(2)
that one file to make sure its cache is up-to-date.  (Yes, this takes a
bit of enforcement work, but if you control all programs that muck with
your mail (which is probably good, anyway), it should be fairly trivial.
Your MDA will already be modifying the directory's mtime on mail delivery,
so a tiny daemon that touches your special file every time the directory's
mtime changes will take care of the MDA and any other programs that move
messages around.)

BTW - If you provide a reload-message-from-mailstore function (preferably
with a better name), then you can cover even the remaining cases, as
long as the user realizes something's wrong ... and as an added bonus,
you'll also be providing a workaround for a whole ton of IMAP bugs in
both Mutt itself and in the IMAP headercache patch :-)

 - Dave

> [1] external modfication of maildir
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=199052 

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgplDg0zloMj9.pgp
Description: PGP signature