all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Max Mikhanosha <max@openchat.com>
Cc: 454@emacsbugs.donarmstrong.com
Subject: bug#454: file-precious-flag overwrites symlinks
Date: Wed, 30 Jul 2008 18:56:16 -0400	[thread overview]
Message-ID: <87zlnzq8vj.fsf@stupidchicken.com> (raw)

> 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?






             reply	other threads:[~2008-07-30 22:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30 22:56 Chong Yidong [this message]
2008-08-01  5:04 ` bug#454: file-precious-flag overwrites symlinks Max Mikhanosha
  -- strict thread matches above, loose matches on Subject: below --
2008-06-20 17:18 Max Mikhanosha

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

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

  git send-email \
    --in-reply-to=87zlnzq8vj.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=454@emacsbugs.donarmstrong.com \
    --cc=max@openchat.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 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.