GNU bug report logs - #4416
23.1; suggestion: a elisp function for copying and deleting whole dir

Previous Next

Package: emacs;

Reported by: "Xah Lee" <xah <at> xahlee.org>

Date: Sat, 12 Sep 2009 05:25:08 UTC

Severity: wishlist

Merged with 4408

Fixed in version 23.2

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4416 in the body.
You can then email your comments to 4416 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4416; Package emacs. (Sat, 12 Sep 2009 05:25:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Xah Lee" <xah <at> xahlee.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 12 Sep 2009 05:25:09 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Xah Lee" <xah <at> xahlee.org>
To: <bug-gnu-emacs <at> gnu.org>
Subject: Re: 23.1; suggestion: a elisp function for copying and deleting whole dir
Date: Fri, 11 Sep 2009 22:21:00 -0700
here's my draft implementation. (thanks to Andreas Politz who pointed out 
the dired-aux function)

(defun copy-directory-recursive (source-dir dest-dir)
 "Copy whole a directory SOURCE-DIR to DEST-DIR.
Note, the semantics of source-dir dest-dir is different from the unix “cp” 
utility.
In unix's “cp -R”, if dest-dir exists, it'll copy source-dir itself, else, 
just source-dir's children.

In copy-directory-recursive, it always copy source-dir's children.

In both, the dest-dir may or may not exist. If not, it'll be created. 
However, dest-dir's parent must exist.

This function is based on dired-copy-file-recursive.
Behavior about linked files, etc, are from that function."
 (require 'dired-aux)
 (dired-copy-file-recursive source-dir dest-dir nil nil nil 'always)
 )

haven't worked on delete-directory-recursive yet...

 Xah
∑ http://xahlee.org/

Merged 4408 4416. Request was from Juanma Barranquero <lekktu <at> gmail.com> to control <at> emacsbugs.donarmstrong.com. (Sat, 12 Sep 2009 12:00:04 GMT) Full text and rfc822 format available.

Severity set to 'wishlist' from 'normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 15 Jan 2010 02:35:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 03 Nov 2011 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 295 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.