the Bane of Emacs 24 Copy Directory Change

By Xah Lee. Date:

emacs 24.3 made incompatible changes to copy-directory again. Caused me 3 hours.

you can read about it by Alt+x view-emacs-news then search for “copy-directory”.

so, now i have this complex code in my script.

(cond
 ((< emacs-major-version 24) (copy-directory fromDir toDir))
 ((= emacs-major-version 24)
  (if (>= emacs-minor-version 3)
      (progn (copy-directory fromDir toDir "KEEP-TIME" "PARENTS" "COPY-CONTENTS") )
    (if (file-exists-p toDir)
        (copy-directory fromDir (concat toDir "/../"))
      (copy-directory fromDir toDir) )
    ) ) )

Complexer and Complexer.

copying a dir is like grafting a tree. For such a function, there are these design issues:

the unix “cp” command is the most idiotic. Its behavior changes depending on whether the destination node exist. Emacs's copy command started to follow the unix ways.

emacs 23's copy-directory was perfect, but they had to change.

Like it? Buy Xah Emacs Tutorial. Thanks.