From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: Re: Bug in copy-file Date: Fri, 31 Jan 2003 12:18:05 +0100 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3E39533D.3090509@math.ku.dk> <3E3A278D.905@math.ku.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1044011910 16466 80.91.224.249 (31 Jan 2003 11:18:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 31 Jan 2003 11:18:30 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18eZBk-0004HS-00 for ; Fri, 31 Jan 2003 12:18:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18eZD0-00033j-05 for gnu-bug-gnu-emacs@m.gmane.org; Fri, 31 Jan 2003 06:19:46 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18eZCp-0002uZ-00 for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2003 06:19:35 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18eZBc-0001Ot-00 for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2003 06:18:22 -0500 Original-Received: from ns.suse.de ([213.95.15.193] helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18eZBO-0001Hm-00 for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2003 06:18:06 -0500 Original-Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 9629615664; Fri, 31 Jan 2003 12:18:05 +0100 (MET) Original-To: Lars Hansen X-Yow: I just put lots of the EGG SALAD in the SILK SOCKS -- In-Reply-To: <3E3A278D.905@math.ku.dk> (Lars Hansen's message of "Fri, 31 Jan 2003 08:36:45 +0100") User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.3.50 (ia64-suse-linux) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4361 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4361 Lars Hansen writes: |> Andreas Schwab wrote: |> |> >Lars Hansen writes: |> > |> >|> A bug has been introduced since Emacs 21.2. |> >|> A "!" has been added where it should not be. |> >|> As a consequence the keep-time parameter functions |> >|> opposite of what is intended. The patch below |> >|> should fix the problem. |> > |> >Why do you think so? The use of keep-time is correct according to the |> >doc string. |> > |> >Andreas. |> > |> Maybe I am misreading the code or the doc string. I read them like this: |> Doc string says: |> |> Fourth arg KEEP-TIME non-nil means give the new file the same |> last-modified time as the old one. |> |> But when keep_time is non-nil, NILP (keep_time) is false, so !NILP |> (keep_time) |> is true. Thus the code following if (NILP (keep_time)) is entered. In |> this code it |> reads |> |> EMACS_GET_TIME (now); |> |> and |> |> if (set_file_times (filename, now, now)) |> |> so the time is set to now, not kept. |> |> Am I wrong? No, you are right. I didn't know that windows is backwards. |> By the way, it is easy to test: Just do eg: You first need to install a proprietary operating system, which is a very difficult and expensive part. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."