I am running Windows 10 with VirtualBox (5.0.10). I have Ubuntu 14.04 installed as a guest OS which accesses the host OS via a vboxfs share.
When editing a file saved on the host (Windows) OS via this share, emacs continually gives me a warning that the file I am currently editing has been changed on disk (File.txt changed on disk; really edit the buffer?
). And a similar warning is given when trying to save.
This only happens when editing a file that is saved on the host OS, and I can’t link it to any other software / process (for example, anti-virus software). It appears to be related to differences in the timestamps of the file on the 2 OS’s, though I do have NTP turned on in Ubuntu, and the error occurs even immediately after the 2 OS’s were rebooted (thus I assume the times are as identical as they will ever be). It occurs every time after the first save.
This question was asked, and work-arounds provided, in this Stackoverflow question. However, the work-arounds given there don’t satisfactorily handle the problem because they effectively just turn off the the safe guard of checking whether a file has been modified on disk outside the editor.
The real problem seems to lie with the timestamp issue. Does anyone know how to fix this issue?
Advertisement
Answer
I don’t know the cause of the resolution to the problem, but it has gone away (for me) with Ubuntu 18.04 installed on Virtual Box 5.2.22.