Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: File losing ownership Date: Wed, 9 Mar 2005 16:53:28 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Hyre, Max" To: "Cygwin List" Content-Transfer-Encoding: 8bit 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/