On 03/02/2013 01:17 PM, Eli Zaretskii wrote: > Can you describe your testing > in more details, and what versions of NFS and Windows did you use? Sure, I created a MS-Windows style lock file .#FILE by hand, then edited FILE with a GNU/Linux Emacs. I didn't build the MS-Windows Emacs, and didn't need to use NFS to reproduce the problem. There's another issue: a GNU/Linux Emacs might be using an MS-Windows file system that does not support symbolic links. Such an Emacs should use a regular-file lock, just as MS-Windows Emacs does, which means that the code to create regular-file locks should be implementable in POSIXish primitives. Also, locking should work even if the Emacs instance that created a lock uses a symlink whereas the Emacs instance trying to get the lock would use a regular file, or vice versa. It'll take some thinking to get all this to work well. I've written a first cut for this and have attached it. I have not tested this on MS-Windows at all, and haven't tested it as much as I'd like on GNU/Linux, but it should give a feel for the sort of changes that need to be made. Unfortunately the patch is a bit complicated, but to some extent this is inherent in such a complicated area.