From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: copy-file: ok-if-already-exists versus mustbenew Date: Mon, 15 May 2006 12:57:04 -0500 (CDT) Message-ID: <200605151757.k4FHv4Ov014980@jane.dms.auburn.edu> References: <4468A7A3.8060302@student.lu.se> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1147715924 18899 80.91.229.2 (15 May 2006 17:58:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 May 2006 17:58:44 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 15 19:58:44 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FfhKt-0003Cn-2c for ged-emacs-devel@m.gmane.org; Mon, 15 May 2006 19:58:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfhKs-0002Ee-KP for ged-emacs-devel@m.gmane.org; Mon, 15 May 2006 13:58:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfhKg-0002EN-03 for emacs-devel@gnu.org; Mon, 15 May 2006 13:58:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfhKe-0002EB-F6 for emacs-devel@gnu.org; Mon, 15 May 2006 13:58:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfhKe-0002E8-7l for emacs-devel@gnu.org; Mon, 15 May 2006 13:58:12 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FfhN6-00065K-Pm for emacs-devel@gnu.org; Mon, 15 May 2006 14:00:44 -0400 Original-Received: from jane.dms.auburn.edu (jane.dms.auburn.edu [131.204.53.201]) by manatee.dms.auburn.edu (8.13.6/8.13.6) with ESMTP id k4FHwBH6010568; Mon, 15 May 2006 12:58:11 -0500 (CDT) Original-Received: from jane.dms.auburn.edu (localhost [127.0.0.1]) by jane.dms.auburn.edu (8.13.4+Sun/8.13.4) with ESMTP id k4FHv4gf014983; Mon, 15 May 2006 12:57:04 -0500 (CDT) Original-Received: (from teirllm@localhost) by jane.dms.auburn.edu (8.13.4+Sun/8.13.3/Submit) id k4FHv4Ov014980; Mon, 15 May 2006 12:57:04 -0500 (CDT) X-Authentication-Warning: jane.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: lennart.borgman.073@student.lu.se In-reply-to: <4468A7A3.8060302@student.lu.se> (message from Lennart Borgman on Mon, 15 May 2006 18:09:07 +0200) 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: news.gmane.org gmane.emacs.devel:54520 Archived-At: Lennart Borgman wrote: I am trying to enhance my reading capabilities, but I can not understand the difference between the arguments ok-if-already-exists and mustbenew in the doc for `copy-file'. Can someone please explain this to me? The only difference I see is that "never overwrite" is mentioned for "mustbenew" - though I hope this holds for the first argument too. I do not immediately see the difference either. mustbenew was introduced by the following change: 2005-04-23 Richard M. Stallman * fileio.c (Fcopy_file): New arg MUSTBENEW. (Frename_file): Pass new arg to Fcopy_file. I do not immediately understand why Frename_file could not have used the ok-if-already-exists arg. However it sounds like the second argument should be about modification times, but the doc string does not say so. I do not understand this one. I assume you mean the second _optional_ argument. From the docstring: Fourth arg keep-time non-nil means give the output file the same last-modified time as the old one. (This works on only some systems.) Another problem is that the preserve-uid-gid arg is not mentioned in the `(elisp)Changing Files' description of copy-file. Sincerely, Luc.