delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/09/16:52:40

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
MIME-Version: 1.0
Subject: RE: File losing ownership
Date: Wed, 9 Mar 2005 16:53:28 -0500
Message-ID: <A4B37AEB4EA13E4DA8B5E1E90B8BF19106CCEA@pluto.EARTH.COM>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: "Hyre, Max" <Max DOT Hyre AT cardiopulmonarycorp DOT com>
To: "Cygwin List" <cygwin AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j29Lqc8d032251

   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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019