On Sun, Sep 26, 1999 at 04:45:36AM +0200, Richard P. Groenewegen wrote:
>On Sun, Sep 26, 1999 at 03:16:29AM +0200, Richard P. Groenewegen wrote:
>> The following solution is kind of a hack, but you might like it.  If
>> have tested the code a little, but be careful with it.  It is probably
>> not that robust yet.
>
>And it sure wasn't.  When I tested it I had some debug output and a
>sleep so I could read what was going on.  When I took out the debug
>code and the sleep it did not work anymore.  But I still don't know
>why.  Here is a simplified example to show what's going on.  Let's
>say I have a script testset with the following perl-code:
[...]
>And I have my editor variable set to this script.  Now, if I edit a
>message with e, a line " ...Last line..." will be added at the bottom
>and I enter the save menu after 1 second of sleep.
>Now when I delete the sleep-line in the script above, and I edit a
>message, the message is unchanged!  No " ...Last line..." added or
>anything.  This might be a perl-question and in stead of the sleep
>there might me a flush statement that also works, but still: if
>someone can explain this to me I would be very happy.  

It's very simple: the script is too fast.  It modifies the newly created
temporary file in less than a second, and so it's mtime doesn't change,
and mutt thinks it wasn't modified.  I've seen a patch for this on one
of the pages linked from www.mutt.org.

Best Regards,
Marius Gedminas
-- 
Everything you read in newspapers is absolutely true, except for that
rare story of which you happen to have first-hand knowledge.
                -- Erwin Knoll

Reply via email to