From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Han Boetes Newsgroups: gmane.emacs.devel Subject: Re: backup method Date: Fri, 28 Jan 2005 04:55:56 +0059 Message-ID: <20050128035618.GI6167@boetes.org> References: <20050127000210.GA6167@boetes.org> <200501270045.j0R0jIq06197@raven.dms.auburn.edu> <20050127015432.GB6167@boetes.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106885775 14581 80.91.229.6 (28 Jan 2005 04:16:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Jan 2005 04:16:15 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 28 05:16:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CuNYI-0001ra-00 for ; Fri, 28 Jan 2005 05:16:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CuNkg-00014m-AC for ged-emacs-devel@m.gmane.org; Thu, 27 Jan 2005 23:28:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CuNkB-00011r-3X for emacs-devel@gnu.org; Thu, 27 Jan 2005 23:28:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CuNk8-000103-9A for emacs-devel@gnu.org; Thu, 27 Jan 2005 23:28:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CuNk8-0000vq-3X for emacs-devel@gnu.org; Thu, 27 Jan 2005 23:28:24 -0500 Original-Received: from [217.120.147.78] (helo=boetes.org) by monty-python.gnu.org with smtp (Exim 4.34) id 1CuNEl-0005Fr-Tn for emacs-devel@gnu.org; Thu, 27 Jan 2005 22:56:00 -0500 Original-Received: (qmail 10085 invoked by uid 1000); 28 Jan 2005 03:56:18 -0000 Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32601 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32601 Richard Stallman wrote: > Han Boetes wrote: > > The default backup method is mv and then create a new file. > > That's nice if you really want to keep the timestamp intact. > > But if you use emacs with crontab -e you remove the tmpfile > > and since the filedescriptor is still open your update to your > > cron is lost -- without warning. It was pretty hard to > > discover why this happened. > > > > So I would like to suggest to make backup by copying the > > default. > > I won't change it in general, but we could probably arrange to > use backup by copying for *this specific case*. Can you give a > precise recipe for distinguishing this case--a regexp for these > file names, perhaps? My initial suggestion to do backup by copying is not the right solution for the problem at all. I explained the right solution in another message in this thread. My prove is: unset TMP TMPDIR export VISUAL='emacs -q' # which does backup by moving by default crontab -e And you can edit your crontab fine since emacs won't make a backup of files in /tmp export TMP=~/.tmp; export TMPDIR=~/.tmp export VISUAL='emacs -q' # which does backup by moving by default crontab -e And you can no longer edit crontabs since emacs will make a backup of files in /tmp. This problem is caused by the fact that not all programs honour TMPDIR and still make tmpfiles in /tmp. Or that emacs does not anticipate this. I described the solution in another message in this thread. # Han