From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: copy-directory
Date: Sun, 04 Oct 2009 21:58:51 +0200 [thread overview]
Message-ID: <873a5z3p8k.fsf@gmx.de> (raw)
In-Reply-To: <83zl87nw88.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 04 Oct 2009 15:07:35 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
> Please don't rely on the `chown' command being available for the
> preserve-uid-gid option. It is only available on Posix platforms.
> Instead, please add a primitive to do this from within Emacs.
I know that. But I do not know how important it is on W32.
> And one more comment about the code:
>
> (mapc
> (lambda (file)
> (if (file-directory-p file)
> (copy-directory file newname keep-time preserve-uid-gid parents)
> (copy-file file newname t keep-time preserve-uid-gid)))
> ;; We do not want to delete "." and "..".
> (directory-files
> directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"))
>
> Instead of this complicated regexp, isn't it easier to just filter out
> "." and ".." by adding a suitable comparison to the function you map
> of the files? I find it not easy to convince myself that the regexp
> indeed matches every valid file name but those two.
I've stolen it from `dired-re-no-dot'. One option would be to add a
similar regexp to files.el, given that I have used it also in
`delete-directory'? (And I will need it also in Tramp)
Best regards, Michael.
next prev parent reply other threads:[~2009-10-04 19:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8763avuyt3.fsf@gmx.de>
[not found] ` <83zl87nw88.fsf@gnu.org>
2009-10-04 16:41 ` copy-directory Stefan Monnier
2009-10-04 20:02 ` copy-directory Michael Albinus
2009-10-05 3:13 ` copy-directory Stefan Monnier
2009-10-05 7:22 ` copy-directory Michael Albinus
2009-10-05 7:57 ` copy-directory David Kastrup
2009-10-06 17:26 ` copy-directory Michael Albinus
2009-10-06 18:50 ` copy-directory Eli Zaretskii
2009-10-04 19:58 ` Michael Albinus [this message]
2009-10-04 21:31 ` copy-directory Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873a5z3p8k.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.