From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: emacs changed file's own user and file permission Date: Mon, 10 Dec 2007 10:42:35 -0800 (PST) Organization: http://groups.google.com Message-ID: <4ad823b9-4941-4883-8771-de43d50913de@e25g2000prg.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1197315645 25939 80.91.229.12 (10 Dec 2007 19:40:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Dec 2007 19:40:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 10 20:40:54 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J1oUm-0001F0-0J for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Dec 2007 20:40:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1oUU-000131-7y for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Dec 2007 14:40:34 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!e25g2000prg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 84 Original-NNTP-Posting-Host: 69.236.121.223 Original-X-Trace: posting.google.com 1197312155 9475 127.0.0.1 (10 Dec 2007 18:42:35 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 10 Dec 2007 18:42:35 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e25g2000prg.googlegroups.com; posting-host=69.236.121.223; posting-account=qPxGtQkAAADb6PWdLGiWVucht1ZDR6fn User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/523.12 (KHTML, like Gecko) Version/3.0.4 Safari/523.12, gzip(gfe), gzip(gfe) Original-Xref: shelby.stanford.edu gnu.emacs.help:154557 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49987 Archived-At: How to stop emacs's backup changing the file's creation date of the original file? Put this code in your emacs init file: "(setq backup-by-copying t)" Explanation: when emacs does a backup, by default it renames the original file into the backup file name, then create a new file as the original file. So that, the original file effectively have its creation date and other meta data completly changed. Unix-like systems (unixes and linuxes) file systems do not record file creation date. (this is one of the major fuckup in unixes, and is a fact few unix people knew, even senior unix sys admins. (I'm not sure what file system linuxes uses now, but is so up to 2004)) The emacs's default behavior is especially bad for Macs, because once you edited some file, its file creation timestamp info is effectively destroyed (and become the time you saved it) This is devastating for those uninitiated. e.g. you started to use emacs, then after a month or so, when you one day wanted to know when was a particular file created, you realized that it's all gone. (this is one of the major damage unixes has done to the computing industry) The reason emacs by default chooses to "rename/mv" instead of the much sensible copying to create the backup, has 2 major reasons: (1) Emacs predominantly lives in the unix universe, even though GNU is anti-unix in principle. (2) Richard Stallman has a "sharing" mentality. According to the emacs manual on the backup section, the reason given for default renaming behavior is because that way people can know who edited the file last. (i.e. the edited file's owener meta data is the person who last edited it. It presumes that people work in a shared-code environment) By far, (1) is the major cause. For (2), we could consider it as a bad decision (and thus damage to the computing industry) that is influenced by Richard Stallman's collectivism idealogy. The issue of (2) is debatable or might even be reasonable given the time frame emacs is active and influential (roughly 1980s to early 1990s). Because during that time, much computing happens in unixes, which is a shared system. However, in the current decade, some 99% of computing machines are used by single-user (i.e. PCs), thus the reason given in emacs doc for emacs backup's default renaming behavior is without much pertinence today. -------- Extra note: for consideration of modernization of emacs, emacs should have backup off by default. This is because, when emacs was active and influencial, the emacs backup is a major convenience. But in the current decade, there's dizzing array and method of transparent and automatic backup utilities and or revision control systems. The emacs's auto-backup (by littering a bunch of ~ files everywhere) is quaint, and has not been adopted by Windows or Mac (which accounts for > 99% of computing machines used by people). Litter ~ files today is more of a distraction than help for vast majority of people today. ----------- In summary, i hope emacs developers will consider, in order of importance: * turn emacs backup off by default. * set backup-by-copying to non-nil by default. * Create options so that emacs backup will be all directed into a user specified directory. (see http://groups.google.com/group/comp.emacs/msg/4611a42bb3d767b5?dmode=source for the last item) Xah xah@xahlee.org $B-t(B http://xahlee.org/ On Dec 9, 6:11 pm, cire wrote: > I am using emacs on windows, have a drive T: mounting a remote host. > while i have edited files, the file permission and owner will be > change, that make the file don't allow user to use. How to fix that > problem? thanks