emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copy-file-doesn't work


From: Glenn Morris
Subject: Re: copy-file-doesn't work
Date: Mon, 02 Feb 2004 20:25:56 +0000
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Michael Albinus wrote:

> (copy-file "~/.emacs" "/tmp/")
>
> Debugger entered--Lisp error: (file-already-exists "File already exists" 
> "/home/albinus/.emacs")
>   copy-file("~/.emacs" "/tmp/")
>   eval((copy-file "~/.emacs" "/tmp/"))
>   eval-expression((copy-file "~/.emacs" "/tmp/") nil)
>   call-interactively(eval-expression)
>
> Of course, "/home/albinus/.emacs" does exists, and "/tmp/.emacs"
> doesn't.

*** fileio.c    31 Jan 2004 04:24:23 -0000      1.497
--- fileio.c    2 Feb 2004 20:19:06 -0000
***************
*** 2407,2413 ****
    CHECK_STRING (newname);
  
    if (!NILP (Ffile_directory_p (newname)))
!     newname = Fexpand_file_name (file, newname);
    else
      newname = Fexpand_file_name (newname, Qnil);
  
--- 2407,2413 ----
    CHECK_STRING (newname);
  
    if (!NILP (Ffile_directory_p (newname)))
!     newname = Fexpand_file_name ( Ffile_name_nondirectory (file), newname);
    else
      newname = Fexpand_file_name (newname, Qnil);


> The problem is not evident with Emacs 21.3.

It barfs for me on 21.3, but then copy-file was not documented as
accepting a directory for NEWNAME in 21.3.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]