From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: w32.c/link() Date: Mon, 16 Jun 2014 22:27:11 +0300 Message-ID: <83egyovenk.fsf@gnu.org> References: <83k38gvr8k.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1402946858 27929 80.91.229.3 (16 Jun 2014 19:27:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Jun 2014 19:27:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Fabrice Popineau Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 16 21:27:31 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WwcZ0-0007gl-R2 for ged-emacs-devel@m.gmane.org; Mon, 16 Jun 2014 21:27:30 +0200 Original-Received: from localhost ([::1]:46057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwcZ0-0003HL-5J for ged-emacs-devel@m.gmane.org; Mon, 16 Jun 2014 15:27:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwcYs-0003HF-E3 for emacs-devel@gnu.org; Mon, 16 Jun 2014 15:27:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwcYm-0008El-H7 for emacs-devel@gnu.org; Mon, 16 Jun 2014 15:27:22 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:61568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwcYm-0008Ea-8V for emacs-devel@gnu.org; Mon, 16 Jun 2014 15:27:16 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N7A00H0005CM600@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Mon, 16 Jun 2014 22:27:14 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7A00HKI0PEIB50@a-mtaout21.012.net.il>; Mon, 16 Jun 2014 22:27:14 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172482 Archived-At: > From: Fabrice Popineau > Date: Mon, 16 Jun 2014 20:48:14 +0200 > Cc: Emacs developers > > 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.