This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: File losing ownership
- From: "Hyre, Max" <Max dot Hyre at cardiopulmonarycorp dot com>
- To: "Cygwin List" <cygwin at cygwin dot com>
- Date: Wed, 9 Mar 2005 16:53:28 -0500
- Subject: RE: File losing ownership
Dear Mr. Breame:
Mr. Pechtchanski wrote:
> This is a design "feature" in emacs (and most of the Windows
editors as
> well). None of them write files in-place. What they do is create a
copy
> of the file with the changes from the editing session. The inode is
also
> changed (easy to check), so what you're seeing is a brand new file.
The
> old one, IIRC, is renamed to "test~" (I don't use emacs, so can't
check).
Exactly, but watch out for /very/ slippery terminology! `Copying'
for backups means to emacs precisely the opposite of what it means in
Mr. P's message. emacs's `copying' for backup means copying the
original version of the file *as the backup*, and writing your changes
in place (into the original file), thus leaving ownership and group
untouched. Here's an extract from the manual to give you a quick &
dirty fix, but you probably want to read the whole page to learn the
ugly details.
From the emacs manual (Info format, node `(emacs) Backup Copying'):
The method of making a backup file may also affect the
file's owner and group. If copying is used, these do not
change. If renaming is used, you become the file's owner, and
the file's group becomes the default (different operating
systems have different defaults for the group).
[...]
If the variable `backup-by-copying' is non-`nil', copying is
used.
You can make the change using emacs's customization facility by
`M-x customize-group RET backup'
and changing the `Backup By Copying' variable. If you don't have the
doc on hand, ask me off-list, and I'll e-mail it to you.
Best wishes,
Max Hyre
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/