bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13149: 24.3.50; Emacs thinks file was changed outside Emacs, but it


From: Dmitry Gutov
Subject: bug#13149: 24.3.50; Emacs thinks file was changed outside Emacs, but it was not
Date: Mon, 14 Jan 2013 18:57:43 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

On 14.01.2013 9:10, Dmitry Gutov wrote:
On 12.12.2012 2:54, Drew Adams wrote:
Anyway, hoping this helps in some way...

I've been seeing the same kind of prompts lately when editing files in
Emacs in Ubuntu inside a virtual machine.

IIRC all those files were were mounted from the host machine
(MS Windows 7) using the vboxsf file system type.

Good to know that someone else is seeing something similar.

In my case, I'm using Windows XP and am not using vboxsf or anything else
special - just an ordinary laptop.

So, I can now reproduce it 100% in the conditions I mentioned above. And
it's mighty annoying.

0. Open a file.
1. Make some changes. Emacs complies.
2. Press C-x C-s, saved successfully.
3. Try to make a single modification. Emacs instantly prompts "...
changed on disk; really edit the buffer?".

Answer yes -> goto 4, answer no -> goto 3.
Answer "revert", buffer reverts, goto -> 1.

4. Make modifications, try to save: "... has changed since visited or
save.  Save anyway?" Answer yes -> goto 2.

If auto-revert-mode is enabled, and you wait the required interval of
time after 2. without making modifications, the buffer is "reverted",
also goto -> 1.

All this on the latest trunk. A build from the latest emacs-24 doesn't
exhibit the problem. Same with not-exactly-latest builds from these
branches I had a few hours ago, with the possible exception of
auto-revert-mode, IIRC it was less reliably helpful. Not sure.

Bisect points to revision 110875 (eggert@cs.ucla.edu-20121113013514-5dej3lndyeb2dwq3):
Fix a race with verify-visited-file-modtime.

Since at least 1991 Emacs has ignored an mtime difference of no
more than one second, but my guess is that this was to work around
file system bugs that were fixed long ago.  Since the race is
causing problems now, let's remove that code.
* fileio.c (Fverify_visited_file_modtime): Do not accept a file
whose time stamp is off by no more than a second.  Insist that the
file time stamps match exactly.

Paul, any suggestions?





reply via email to

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