help-emacs-windows
[Top][All Lists]
Advanced

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

[h-e-w] Re: Temp files in the temp directory


From: Peter Kaiser
Subject: [h-e-w] Re: Temp files in the temp directory
Date: Wed, 18 Feb 2004 16:45:31 +0100
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

Jason Rumney wrote:

Where is it documented that when NT emacs reads, alters, and writes a file in the %TEMP% directory -- say, on Win2K -- it doesn't create a backup file?
Emacs does not create backup files for simply reading a file. It does
create autosave files after the file is altered (though not
immediately), and it creates backup files when a file is saved. There is
no special treatment for %TEMP%.

What you describe is what I'd expect. However, I've monitored emacs's behavior using the Sysinternals file monitoring utility FILEMON, and in %TEMP% emacs doesn't do this.

With NT emacs I read, modify, and save a file. FILEMON shows that emacs normally renames the original file to its backup name, then writes the modified buffer under the original name.

But in %TEMP% -- and only there, so far as I can tell -- it goes through this sequence for the modified file instead:

    1. Open
    2. Query writability
    3. Close
    4. Open
    5. Set information
    6. Write (under the original name)
    7. Flush
    8. Close

No rename, no backup file -- in other words, different logic. And that's what I'm asking about. I have the monitoring logs.

Pete




reply via email to

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