unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Fabrice Popineau <fabrice.popineau@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: w32.c/link()
Date: Mon, 16 Jun 2014 22:27:11 +0300	[thread overview]
Message-ID: <83egyovenk.fsf@gnu.org> (raw)
In-Reply-To: <CAFgFV9Na8NXa6Vb+A+675+RWaijkYSX=bKS4Pdtm6FEwcTnJpg@mail.gmail.com>

> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Mon, 16 Jun 2014 20:48:14 +0200
> Cc: Emacs developers <emacs-devel@gnu.org>
> 
> 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	other threads:[~2014-06-16 19:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16  7:30 w32.c/link() Fabrice Popineau
2014-06-16 14:55 ` w32.c/link() Eli Zaretskii
2014-06-16 17:55   ` w32.c/link() Fabrice Popineau
2014-06-16 18:48     ` w32.c/link() Fabrice Popineau
2014-06-16 19:27       ` Eli Zaretskii [this message]
2014-06-16 20:58       ` w32.c/link() Stefan Monnier
2014-06-16 22:08         ` w32.c/link() Fabrice Popineau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83egyovenk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=fabrice.popineau@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).