all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#454: file-precious-flag overwrites symlinks
@ 2008-07-30 22:56 Chong Yidong
  2008-08-01  5:04 ` Max Mikhanosha
  0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2008-07-30 22:56 UTC (permalink / raw
  To: Max Mikhanosha; +Cc: 454

> I keep my .emacs file under version control as part of overall
> collection of config files, and as result ~/.emacs is a symbolic
> link.
>
> `backup-by-copying-when-linked' is set to t, so visiting ~/.emacs
> and then editing and saving it correctly saves the file that
> symlink is pointing too.
>
> For a long time I was trying to track down why sometimes, my ~/.emacs
> symbolic link is suddenly overwritten by the actual file.
>
> Finally found that this happens when one uses "Save for future
> session" in customize package, and farther tracked it down to a
> behavior of `basic-save-buffer-2' when file-precious-flag is set.

Setting file-precious-flag to t in custom-save-all shouldn't be a
problem, because the custom file is visited using
find-file-visit-truename.  I tried to reproduce your problem, without
success:

$ touch foo
$ ln -s foo .emacs
$ emacs
  M-x customize-variable RET sentence-end-double-space RET
  [Click on Toggle]
  C-x C-s
  C-x C-c
$ ls -l foo .emacs

lrwxrwxrwx 1 cyd cyd   3 2008-07-30 18:54 .emacs -> foo
-rw-r--r-- 1 cyd cyd 528 2008-07-30 18:55 foo

Could you provide a recipe that shows this problem?






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

end of thread, other threads:[~2008-08-02 21:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87vdyj9lca.fsf@stupidchicken.com>
2008-06-20 17:18 ` bug#454: file-precious-flag overwrites symlinks Max Mikhanosha
2008-08-02 21:15   ` bug#454: marked as done (file-precious-flag overwrites symlinks) Emacs bug Tracking System
2008-07-30 22:56 bug#454: file-precious-flag overwrites symlinks Chong Yidong
2008-08-01  5:04 ` Max Mikhanosha

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.