From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: backup method Date: Sat, 29 Jan 2005 12:42:31 -0600 (CST) Message-ID: <200501291842.j0TIgVw09020@raven.dms.auburn.edu> References: <20050127000210.GA6167@boetes.org> <200501270045.j0R0jIq06197@raven.dms.auburn.edu> <20050127015432.GB6167@boetes.org> <20050128035618.GI6167@boetes.org> <20050129060851.GQ6167@boetes.org> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1107024832 4252 80.91.229.6 (29 Jan 2005 18:53:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 29 Jan 2005 18:53:52 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 29 19:53:48 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 1CuxhX-0001DS-00 for ; Sat, 29 Jan 2005 19:52:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CuxoY-0000el-Vu for ged-emacs-devel@m.gmane.org; Sat, 29 Jan 2005 13:59:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cuxnr-0000Ra-4K for emacs-devel@gnu.org; Sat, 29 Jan 2005 13:58:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cuxnm-0000Ms-Bd for emacs-devel@gnu.org; Sat, 29 Jan 2005 13:58:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cuxnl-0000K2-VX for emacs-devel@gnu.org; Sat, 29 Jan 2005 13:58:34 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CuxZO-0006y6-Mw for emacs-devel@gnu.org; Sat, 29 Jan 2005 13:43:42 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j0TIha9N017300; Sat, 29 Jan 2005 12:43:36 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j0TIgVw09020; Sat, 29 Jan 2005 12:42:31 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: han@mijncomputer.nl In-reply-to: <20050129060851.GQ6167@boetes.org> (message from Han Boetes on Sat, 29 Jan 2005 07:08:29 +0100) 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:32624 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32624 Han Boetes wrote: I do have one question left though: Is this patch sufficiently portable? Looking through files.el I found this description of what a temporary-file-directory looks like: I am not _sure_, but I have the impression that `temporary-file-directory' was exactly intended for portability reasons. I believe that it was intended to be the "normal" place for the OS to put temporary files. You normally do not have to customize it because the code you quoted normally gets it right. If it gets it wrong, you have to customize it. I have the impression that to get the portability you want, you would need two new variables, that would do what I believe `temporary-file-directory' and `small-temporary-file-directory' are actually intended to do, `system-temporary-file-directory' and `system-small-temporary-file-directory'. I do not really know whether that would really be the correct solution. Note that we are discussing whether or not to make backup files while discussing a problem that has nothing at all to do with whether it is useful or not to make backup files. The only thing we are worried about is whether the file should be copied or overwritten on save. Some people _want_ and _expect_ Emacs to make backups in /temp/, because they do make changes there that they might regret. They then try to use the backup file, which is not there. I have seen "bug" reports by people who where very inconvenienced by this (for them) unexpected behavior. "How come Emacs always makes backup files _except_ when I really need them?". Default Emacs is not an overwrite-on-save system and it is not a copy-on-save system either. By default, Emacs copies on save if and only if a backup is made. This links two unrelated questions, "Do I need a copy in case I regret my edits" and "Does this file need to be copied or overwritten on save". Obviously, there are going to be situations where this creates problems. I believe that the correct solution in this particular case is to make `normal-backup-enable-predicate' use a customizable list of directories in which no backups are made, say `no-backup-directories'. We could then tell people that if they want remove "/temp/" or equivalent from the list, they should set `backup-by-copying' to t, or we could use a second customizable variable `backup-by-copying-directories', to unlink the two problems (at least in this particular case). Sincerely, Luc.