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 Date: Wed, 9 Mar 2005 12:40:53 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Colin JN Breame cc: cygwin AT cygwin DOT com Subject: Re: File losing ownership In-Reply-To: <200503091711.03207.colin@breame.net> Message-ID: References: <200503091711 DOT 03207 DOT colin AT breame DOT net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 9 Mar 2005, Colin JN Breame wrote: > I have a file such that: > > $ ls -l test > -rw-r--r-- 1 Administrators None 6 Mar 9 17:00 test > > I open it and save in emacs. > > $ ls -l test > -rw-r--r-- 1 colin None 7 Mar 9 17:00 test > > Is this a bug? 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). This, BTW, is one of the reasons you can't use emacs as crontab editor, or anything else that expects the file to be written in-place. Igor P.S. I think I'm being a bit unfair ("I'm a VIm guy"), and you *can* configure emacs to write files in-place -- it's just not done by default. -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- 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/