Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I edit a file in Emacs on my Ubuntu Linux system and try to save, I sometimes see the message:

File foo.txt has changed on disk. Really save? 

The weird thing is that I haven't changed it on disk, I'm just editing it in Emacs and nothing else. I've saved it myself a minute ago and that should be its last state. So some other process must be touching it behind my back, while I'm editing it.

Of course I can tell Emacs to save anyway, but I'm just curious why the file has allegedly changed without my knowledge.

Does anyone know this problem? What is a likely cause? Or is it possibly an Emacs bug?

share|improve this question
    
What file? Is it a file in particular? –  cYrus Oct 6 '10 at 0:58
    
It is just some random text file I am editing in my home directory, e.g. $HOME/foo.txt. –  Frank Oct 6 '10 at 1:06
    
Does the file has really changed or just touched (changed the time stamps)? –  cYrus Oct 6 '10 at 1:18
    
Hmm, I didn't check. I assume just the time stamp has changed for some reason ... –  Frank Oct 6 '10 at 1:21
    
I don't know if this is a related problem, but sometimes it takes about a second or two to save a file ... :-( –  Frank Oct 6 '10 at 1:38
show 3 more comments

1 Answer

If you are editing remote files on ftp server it is definitely clock sync problem. You have different time from remote host. Solution for that is to setup ntpd and sync it. That is how I solved my problem with remote host. Didn't have that kind of problems with local file editing.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.