emacs-devel
[Top][All Lists]
Advanced

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

Re: w32.c/link()


From: Eli Zaretskii
Subject: Re: w32.c/link()
Date: Mon, 16 Jun 2014 22:27:11 +0300

> From: Fabrice Popineau <address@hidden>
> Date: Mon, 16 Jun 2014 20:48:14 +0200
> Cc: Emacs developers <address@hidden>
> 
> emacs -Q
> 
> M-: (add-name-to-file "c:/temp/foo.el" "c:/temp/foo1.el" t)
> 
> M-x c:/temp/foo.el
> add a few characters
> C-x s
> M-x dired
> 
> And foo.el size has changed, but not foo1.el size.
> 
> This is because after editing foo.el, foo1.el is still a hard link but to
> foo.el~ (autosave file). :-/

That's why I told you to set backup-by-copying-when-linked to a
non-nil value: out avoids the problem you describe.  If you don't do
that, Emacs _renames_ the original file to the backup name, so the
linked file gets renamed, and the new one, created under its name, is
not a link.




reply via email to

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