all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs breaks hard links?
@ 2006-07-15 18:32 Sebastian Pipping
  2006-07-16 19:24 ` Reiner Steib
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Pipping @ 2006-07-15 18:32 UTC (permalink / raw)


Hello!


When I save a file in Emacs it seems the original file
is renamed to "example~" and a new file "example"
is created. This causes trouble with hard links:
If the original file was shared by three hard links
then after saving the other two hard links share
the file content with the backup file while the
up-to-date file is not linked to them anymore.

I wonder if this hard-link-breaking-logic was really
intended. Please let me know what you think about this.


Regards, Sebastian


-- 
Sebastian Pipping
http://www.hartwork.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Emacs breaks hard links?
  2006-07-15 18:32 Emacs breaks hard links? Sebastian Pipping
@ 2006-07-16 19:24 ` Reiner Steib
  0 siblings, 0 replies; 3+ messages in thread
From: Reiner Steib @ 2006-07-16 19:24 UTC (permalink / raw)
  Cc: bug-gnu-emacs

On Sat, Jul 15 2006, Sebastian Pipping wrote:

> When I save a file in Emacs it seems the original file
> is renamed to "example~" and a new file "example"
> is created. This causes trouble with hard links:
> If the original file was shared by three hard links
> then after saving the other two hard links share
> the file content with the backup file while the
> up-to-date file is not linked to them anymore.
>
> I wonder if this hard-link-breaking-logic was really
> intended. Please let me know what you think about this.

Set `backup-by-copying-when-linked' to t:

,----[ (info "(emacs)Backup Copying") ]
|    The choice of renaming or copying is controlled by four variables.
| Renaming is the default choice.  If the variable `backup-by-copying' is
| non-`nil', copying is used.  Otherwise, if the variable
| `backup-by-copying-when-linked' is non-`nil', then copying is used for
| files that have multiple names, but renaming may still be used when the
| file being edited has only one name.
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Emacs breaks hard links?
       [not found] <mailman.4130.1152998149.9609.bug-gnu-emacs@gnu.org>
@ 2006-07-16 20:32 ` Miles Bader
  0 siblings, 0 replies; 3+ messages in thread
From: Miles Bader @ 2006-07-16 20:32 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Sebastian Pipping <webmaster@hartwork.org> writes:
> I wonder if this hard-link-breaking-logic was really
> intended. Please let me know what you think about this.

Yes, it is quite intentional.

If you don't like it, you can set/customize `backup-by-copying' (or
probably rather, `backup-by-copying-when-linked') to true.

-Miles
-- 
"Most attacks seem to take place at night, during a rainstorm, uphill,
 where four map sheets join."   -- Anon. British Officer in WW I

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-16 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-15 18:32 Emacs breaks hard links? Sebastian Pipping
2006-07-16 19:24 ` Reiner Steib
     [not found] <mailman.4130.1152998149.9609.bug-gnu-emacs@gnu.org>
2006-07-16 20:32 ` Miles Bader

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.