Emacs22 doesn't work properly with hard links

Bug #500567 reported by kostek on 2009-12-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
emacs22 (Ubuntu)

Bug Description

Binary package hint: emacs22

I'm using Ubuntu Karmic with GNU Emacs 22.2.1.

So, I want to create a hard link to some text file, say, "somefile" with ln or link command:

 ~$ echo hello > somefile
 ~$ ln somefile somefile-link
 ~$ cat somefile
 ~$ cat somefile-link

After editing and saving "somefile" with emacs22, I get this:

 ~$ cat somefile
 ~$ cat somefile-link

As you can see, emacs have broken the link between two files.

kostek (c-kostik) wrote :

i think, it's all about this:)

   ~$ ls -i somefile*
   283 somefile 280 somefile~ 280 somefile-link

Phil Sung (psung) wrote :

As a workaround, you can set

    (setq backup-by-copying-when-linked t)

in your .emacs file. I suspect performance considerations might prevent setting the default value of this variable to `t', though.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers